diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json deleted file mode 100644 index 8eb8d893..00000000 --- a/.github/pr-title-checker-config.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "LABEL": { - "name": "title needs formatting", - "color": "EEEEEE" - }, - "CHECKS": { - "regexp": "^(\\[wip\\]|\\[backport\\]|\\[cherry-pick\\])?( )?(feat|fix|docs|build|test|ci|chore|refactor|perf)!?(\\(.*\\))?!?:.*", - "regexpFlags": "i", - "ignoreLabels" : ["dont-check-PR-title"] - }, - "MESSAGES": { - "success": "PR title is valid", - "failure": "PR title is invalid", - "notice": "PR Title needs to pass case insensitive regex '^(\\[wip\\]|\\[backport\\]|\\[cherry-pick\\])?( )?(feat|fix|docs|build|test|ci|chore|refactor|perf)!?(\\(.*\\))?!?:.*'" - } -} \ No newline at end of file diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml deleted file mode 100644 index d3c9470c..00000000 --- a/.github/workflows/pr-title-check.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: "Lint PR" - -on: - pull_request_target: - types: [opened, edited, reopened, synchronize, labeled, unlabeled] - - -# IMPORTANT: No checkout actions, scripts, or builds should be added to this workflow. Permissions should always be used -# with extreme caution. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target -permissions: - pull-requests: write - contents: read - -# PR updates can happen in quick succession leading to this -# workflow being trigger a number of times. This limits it -# to one run per PR. -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - - -jobs: - validate: - name: Validate PR Title - runs-on: ubuntu-latest - outputs: - success: ${{ steps.check.outputs.success }} - steps: - - name: PR Title Check - uses: thehanimo/pr-title-checker@v1.4.3 - id: check - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - pass_on_octokit_error: false - configuration_path: ".github/pr-title-checker-config.json" - - fail: - name: PR Title Check Failed - runs-on: ubuntu-latest - needs: validate - if: ${{ always() && needs.validate.outputs.success == 'false'}} - steps: - - name: Add comment to fix PR title - uses: marocchino/sticky-pull-request-comment@v2 - with: - header: 'PR Title Check' - recreate: true - message: | - ### 🚨 PR Title Needs Formatting - The title of this PR needs to be formatted correctly. - Please update the title to match the format `type: description AB#xxx`. Examples: - * `fix: fix typo in README.md AB#123` - * `chore: update dependencies AB#456` - * `feat: add new feature AB#789` - * `chore: fixing build pipeline` - no AB reference - * `build(deps): bump BlahBlah from 1.0 to 1.1` - * `[wip] feat: add new feature AB#123` - * `[cherry-pick] fix: fix typo in README.md AB#123` - * `[backport] fix: fix typo in README.md AB#123` - - For more details, please refer to the [Conventional Commits Specification](https://www.conventionalcommits.org/en/v1.0.0) - and the [PR Title Configuration File](.github/pr-title-checker-config.json). - - name: Set action status to failed - run: | - echo "❌ PR Title Check Failed" - exit 1 - - success: - name: PR Title Check Passed - runs-on: ubuntu-latest - needs: validate - if: ${{ always() && needs.validate.outputs.success == 'true' }} - steps: - - name: Add comment that PR title is fixed - uses: marocchino/sticky-pull-request-comment@v2 - with: - header: 'PR Title Check' - recreate: true - message: | - ### ✅ PR Title Formatted Correctly - The title of this PR has been updated to match the correct format. Thank you! \ No newline at end of file