diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000000..1ad4e1814b3 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,37 @@ + + + + +# Description + + + + + +# Checklist + + + +* [ ] The PR satisfies the [contribution guidelines][yscope-contrib-guidelines]. +* [ ] This is a breaking change and that has been indicated in the PR title, OR this isn't a + breaking change. +* [ ] Necessary docs have been updated, OR no docs need to be updated. + +# Validation performed + + + + + +[yscope-contrib-guidelines]: https://docs.yscope.com/dev-guide/contrib-guides-overview.html diff --git a/.github/workflows/pr-title-checks.yaml b/.github/workflows/pr-title-checks.yaml new file mode 100644 index 00000000000..50a64077c38 --- /dev/null +++ b/.github/workflows/pr-title-checks.yaml @@ -0,0 +1,30 @@ +name: "pr-title-checks" + +on: + pull_request_target: + # NOTE: Workflows triggered by this event give the workflow access to secrets and grant the + # `GITHUB_TOKEN` read/write repository access by default. So we need to ensure: + # - This workflow doesn't inadvertently check out, build, or execute untrusted code from the + # pull request triggered by this event. + # - Each job has `permissions` set to only those necessary. + types: ["edited", "opened", "reopened"] + branches: ["presto-0.293-clp-connector"] + +permissions: {} + +concurrency: + group: "${{github.workflow}}-${{github.ref}}" + + # Cancel in-progress jobs for efficiency + cancel-in-progress: true + +jobs: + conventional-commits: + permissions: + # For amannn/action-semantic-pull-request + pull-requests: "read" + runs-on: "ubuntu-latest" + steps: + - uses: "amannn/action-semantic-pull-request@v5" + env: + GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" diff --git a/.github/workflows/preliminary_checks.yml b/.github/workflows/preliminary_checks.yml index 3e63212b5ec..bd094f3abb4 100644 --- a/.github/workflows/preliminary_checks.yml +++ b/.github/workflows/preliminary_checks.yml @@ -75,23 +75,3 @@ jobs: echo "\`\`\`" >> $GITHUB_STEP_SUMMARY exit 1 fi - - title-check: - name: PR Title Format - runs-on: ubuntu-latest - steps: - - shell: python - env: - title: "${{ github.event.pull_request.title }}" - run: | - import re - import os - title = os.environ["title"] - title_re = r"^(feat|fix|build|test|docs|refactor|misc)(\(.+\))?!?: ([A-Z].+)[^.]$" - match = re.search(title_re, title) - - if match is None: - print("::error::Please follow conventional commit guidelines in commit titles as described in CONTRIBUTING.md: https://github.com/facebookincubator/velox/blob/main/CONTRIBUTING.md#commit-messages") - exit(1) - else: - exit(0)