From 033e884bbae417285898c79653a2572a46eee86e Mon Sep 17 00:00:00 2001 From: Abhishek Jain Date: Thu, 19 Sep 2024 23:37:44 +0530 Subject: [PATCH] feat: Add GitHub PR Checks Workflow (#160) --- .github/pr_checks_config.yml | 10 ++++++++++ .github/workflows/pr_checks.yml | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/pr_checks_config.yml create mode 100644 .github/workflows/pr_checks.yml diff --git a/.github/pr_checks_config.yml b/.github/pr_checks_config.yml new file mode 100644 index 0000000..921aa22 --- /dev/null +++ b/.github/pr_checks_config.yml @@ -0,0 +1,10 @@ +pr_checks: + title: + - name: 'prefix_check' + regex: '^(?i)(fix|feat|test|chore|refactor|build):' + message_if_not_matching: 'PR title must start with "fix:", "feat:", "chore:", "refactor", or "test:" (case-insensitive)' + + description: + - name: 'clickup_check' + regex: '(?i)app.clickup.com' + message_if_not_matching: 'PR description must contain a link to a ClickUp (case-insensitive)' \ No newline at end of file diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml new file mode 100644 index 0000000..830d8bc --- /dev/null +++ b/.github/workflows/pr_checks.yml @@ -0,0 +1,19 @@ +name: Strong PR Checks + +on: + pull_request: + types: [opened, synchronize, edited] + +permissions: + pull-requests: write + contents: read + +jobs: + pr_checks: + runs-on: ubuntu-latest + steps: + - name: Run strong checks + uses: fylein/fyle-pr-action@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + config-file: .github/pr_checks_config.yml \ No newline at end of file