From 1313635fccdff475a6510318854a83ce879f0dff Mon Sep 17 00:00:00 2001 From: shubham-fyle Date: Tue, 8 Oct 2024 17:33:04 +0530 Subject: [PATCH] added actions --- .github/pr-checks-config.yml | 10 ++++++++++ .github/pull_request_template.md | 5 +++++ .github/workflows/pr-checks.yml | 20 ++++++++++++++++++++ .github/workflows/pr-size.yml | 21 +++++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 .github/pr-checks-config.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/pr-checks.yml create mode 100644 .github/workflows/pr-size.yml diff --git a/.github/pr-checks-config.yml b/.github/pr-checks-config.yml new file mode 100644 index 0000000..33d14b4 --- /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)' diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..5b984f8 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,5 @@ +### Description +Please add PR description here, add screenshots if needed + +## Clickup +Please add link here \ 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..c90951a --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,20 @@ + +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 diff --git a/.github/workflows/pr-size.yml b/.github/workflows/pr-size.yml new file mode 100644 index 0000000..b4a4ef7 --- /dev/null +++ b/.github/workflows/pr-size.yml @@ -0,0 +1,21 @@ +name: Pull Request Labeling + +on: [pull_request] + +jobs: + size: + runs-on: ubuntu-latest + name: Label the PR size + steps: + - uses: "pascalgn/size-label-action@v0.4.3" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + sizes: > + { + "0": "XS", + "20": "S", + "50": "M", + "250": "L", + "800": "XL" + }