From 2e124d4f8936479497cb623b31c64e02bf59b7b7 Mon Sep 17 00:00:00 2001 From: Akshay Patidar Date: Tue, 29 Nov 2022 18:46:38 +0530 Subject: [PATCH] chore: add pr checks Signed-off-by: Akshay Patidar --- .github/pull_request_template.md | 6 ++++++ .github/workflows/prchecks.yml | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/prchecks.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f402a099..c3216dca 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,3 +6,9 @@ ## Resources + + +## Checklist + +- [ ] Documentation updated +- [ ] Added tests as appropriate (Test Coverage Improved) diff --git a/.github/workflows/prchecks.yml b/.github/workflows/prchecks.yml new file mode 100644 index 00000000..3745a018 --- /dev/null +++ b/.github/workflows/prchecks.yml @@ -0,0 +1,22 @@ +name: Pull Request Lint + +on: + pull_request: + types: ['opened', 'edited', 'reopened', 'synchronize'] + +jobs: + title: + name: ticket check + runs-on: ubuntu-latest + + steps: + - name: Check for ticket + uses: neofinancial/ticket-check-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ticketLink: 'https://dream11.atlassian.net/browse/DX-%ticketNumber%' + ticketPrefix: 'DX-' + titleRegex: '^DX-(?\d+)' + branchRegex: '^DX-(?\d+)' + bodyRegex: 'DX-(?\d+)' + bodyURLRegex: 'http(s?):\/\/(dream11.atlassian.net)(\/browse)\/(DX\-)(?\d+)'