From 1c914ce8d4d07948a05db5df4f6232a03b6ba47f Mon Sep 17 00:00:00 2001 From: smog-root Date: Thu, 17 Oct 2024 20:50:19 +0530 Subject: [PATCH 1/3] Create .github\workflow\pr-checker.yml --- ".github\\workflow\\pr-checker.yml" | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ".github\\workflow\\pr-checker.yml" diff --git "a/.github\\workflow\\pr-checker.yml" "b/.github\\workflow\\pr-checker.yml" new file mode 100644 index 0000000..a8875f3 --- /dev/null +++ "b/.github\\workflow\\pr-checker.yml" @@ -0,0 +1,33 @@ +name: PR Issue Checker + +on: + pull_request: + types: [opened, edited] + +jobs: + check_pr_description: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Check PR Description + id: check_pr_description + run: | + PR_DESCRIPTION="${{ github.event.pull_request.body }}" + if [[ -z "$PR_DESCRIPTION" ]]; then + echo "PR description is missing." + exit 1 + fi + + if [[ ! "$PR_DESCRIPTION" =~ Fixes\ #[0-9]+ ]]; then + echo "The PR description should include 'Fixes #' if not addressing any issue." + echo "##[error]Fixes #NEW must be included in the description." + exit 1 + fi + + echo "PR description is valid." + + - name: Output result + run: echo "All checks passed." From 5537867dcdcf59b576c756ba270db7b8c95a1685 Mon Sep 17 00:00:00 2001 From: smog-root Date: Thu, 17 Oct 2024 20:50:38 +0530 Subject: [PATCH 2/3] Delete .github\workflow\pr-checker.yml --- ".github\\workflow\\pr-checker.yml" | 33 ----------------------------- 1 file changed, 33 deletions(-) delete mode 100644 ".github\\workflow\\pr-checker.yml" diff --git "a/.github\\workflow\\pr-checker.yml" "b/.github\\workflow\\pr-checker.yml" deleted file mode 100644 index a8875f3..0000000 --- "a/.github\\workflow\\pr-checker.yml" +++ /dev/null @@ -1,33 +0,0 @@ -name: PR Issue Checker - -on: - pull_request: - types: [opened, edited] - -jobs: - check_pr_description: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Check PR Description - id: check_pr_description - run: | - PR_DESCRIPTION="${{ github.event.pull_request.body }}" - if [[ -z "$PR_DESCRIPTION" ]]; then - echo "PR description is missing." - exit 1 - fi - - if [[ ! "$PR_DESCRIPTION" =~ Fixes\ #[0-9]+ ]]; then - echo "The PR description should include 'Fixes #' if not addressing any issue." - echo "##[error]Fixes #NEW must be included in the description." - exit 1 - fi - - echo "PR description is valid." - - - name: Output result - run: echo "All checks passed." From 4ac3e64555a37d3f890b1eb5faa59232df39a800 Mon Sep 17 00:00:00 2001 From: smog-root Date: Thu, 17 Oct 2024 21:44:11 +0530 Subject: [PATCH 3/3] Create pr-check.yml --- .github/workflows/pr-check.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 0000000..a8875f3 --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,33 @@ +name: PR Issue Checker + +on: + pull_request: + types: [opened, edited] + +jobs: + check_pr_description: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Check PR Description + id: check_pr_description + run: | + PR_DESCRIPTION="${{ github.event.pull_request.body }}" + if [[ -z "$PR_DESCRIPTION" ]]; then + echo "PR description is missing." + exit 1 + fi + + if [[ ! "$PR_DESCRIPTION" =~ Fixes\ #[0-9]+ ]]; then + echo "The PR description should include 'Fixes #' if not addressing any issue." + echo "##[error]Fixes #NEW must be included in the description." + exit 1 + fi + + echo "PR description is valid." + + - name: Output result + run: echo "All checks passed."