diff --git a/.github/pull-request-templates/task_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/task_pull_request_template.md similarity index 100% rename from .github/pull-request-templates/task_pull_request_template.md rename to .github/PULL_REQUEST_TEMPLATE/task_pull_request_template.md diff --git a/.github/pull-request-templates/test_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/test_pull_request_template.md similarity index 100% rename from .github/pull-request-templates/test_pull_request_template.md rename to .github/PULL_REQUEST_TEMPLATE/test_pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..4cfa2a21b --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +# Warning + +Please update the url to include the template name. + +## To use the task template + +You must add this as a suffix to the url `?template=task_pull_request_template.md` + +## To use the test template + +You must add this as a suffix to the url `?template=test_pull_request_template.md` diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 442201fe5..22b826e62 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -3,7 +3,7 @@ on: push: branches: [develop, main] pull_request: - types: [opened, synchronize, reopened] + types: [opened, ready_for_review, synchronize, reopened] jobs: check-code-quality: runs-on: ubuntu-latest diff --git a/.github/workflows/create-pull-request.yml b/.github/workflows/create-pull-request.yml deleted file mode 100644 index 37af38cf9..000000000 --- a/.github/workflows/create-pull-request.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: "Create Pull Requests" -on: - push: - branches: - - "task/*" - - "test/*" - -jobs: - pull-request: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Get branch number - run: echo "BRANCH_NUMBER=$(echo ${{ github.ref_name }} | grep -Eo '[A-Za-z]{2,5}-[0-9]{1,5}')" >> $GITHUB_ENV - - name: Get branch designator - run: echo "BRANCH_DESIGNATOR=$(echo ${{ github.ref_name }} | sed 's|/.*||')" >> $GITHUB_ENV - - name: Render Pull Request template - id: template - uses: chuhlomin/render-template@v1.4 - with: - template: .github/pull-request-templates/${{ env.BRANCH_DESIGNATOR }}_pull_request_template.md - vars: | - BRANCH_NUMBER: ${{ env.BRANCH_NUMBER }} - BRANCH_DESIGNATOR: ${{ env.BRANCH_DESIGNATOR }} - - name: Create Pull Request - uses: repo-sync/pull-request@v2 - with: - destination_branch: "develop" - pr_title: "${{ github.ref_name }} into develop" - pr_body: ${{ steps.template.outputs.result }} - pr_draft: true - github_token: ${{ secrets.GITHUB_TOKEN }}