From c6f49857da5daeefade3e19e668456453875d667 Mon Sep 17 00:00:00 2001 From: Ameer jafar Date: Tue, 21 May 2024 10:39:58 +0530 Subject: [PATCH 1/7] bug: remove the unwanted logs --- backend/api/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/api/index.js b/backend/api/index.js index e971c3ab..35b79442 100644 --- a/backend/api/index.js +++ b/backend/api/index.js @@ -1,3 +1,2 @@ import app from '../app.js'; export default app; -console.log('ameer jafar'); From 6c8617c2ddc6feb72c56504458d59a3a7057282b Mon Sep 17 00:00:00 2001 From: Ameer jafar Date: Tue, 21 May 2024 10:48:43 +0530 Subject: [PATCH 2/7] feat: Added the github token --- .github/workflows/pr-title-checker.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-title-checker.yaml b/.github/workflows/pr-title-checker.yaml index b4b78870..906860f0 100644 --- a/.github/workflows/pr-title-checker.yaml +++ b/.github/workflows/pr-title-checker.yaml @@ -33,7 +33,7 @@ jobs: run: | gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body "Thank you ${{github.actor}}! Your PR title meets our guidelines." env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Close PR if title is invalid if: failure() @@ -41,7 +41,7 @@ jobs: gh pr close ${{ github.event.pull_request.number }} -R ${{ github.repository }} gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body $'Hello ${{github.actor}} Thank you for your PR. Unfortunately, it doesn\'t meet our quality checks.\n\nPlease ensure you follow our contribution guidelines. The PR title should match the required format.\n\nFor example, it should be like: `fix-#124: Added responsiveness to the Home page screen.`\n\nIf you have any query kindly check our [contributor guidelines](https://github.com/krishnaacharyaa/wanderlust/blob/main/.github/CONTRIBUTING.md).' env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Reopen PR if title is corrected if: github.event.action == 'edited' && success() @@ -50,4 +50,4 @@ jobs: gh pr reopen ${{ github.event.pull_request.number }} -R ${{ github.repository }} fi env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bf548cdbe1e8b75f11743190b2607ba59a4a5940 Mon Sep 17 00:00:00 2001 From: Ameer jafar Date: Tue, 21 May 2024 10:58:46 +0530 Subject: [PATCH 3/7] feat: replaced GITHUB_TOKEN with the GH_TOKEN --- .github/workflows/pr-title-checker.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-title-checker.yaml b/.github/workflows/pr-title-checker.yaml index 906860f0..8555869c 100644 --- a/.github/workflows/pr-title-checker.yaml +++ b/.github/workflows/pr-title-checker.yaml @@ -25,7 +25,7 @@ jobs: id: title-check uses: thehanimo/pr-title-checker@v1.4.1 with: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + GH_TOKEN: ${{ secrets.PAT_TOKEN }} pass_on_octokit_error: false configuration_path: .github/pr-title-checker-config.json - name: pt title satisfied @@ -33,7 +33,7 @@ jobs: run: | gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body "Thank you ${{github.actor}}! Your PR title meets our guidelines." env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.PAT_TOKEN }} - name: Close PR if title is invalid if: failure() @@ -41,7 +41,7 @@ jobs: gh pr close ${{ github.event.pull_request.number }} -R ${{ github.repository }} gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body $'Hello ${{github.actor}} Thank you for your PR. Unfortunately, it doesn\'t meet our quality checks.\n\nPlease ensure you follow our contribution guidelines. The PR title should match the required format.\n\nFor example, it should be like: `fix-#124: Added responsiveness to the Home page screen.`\n\nIf you have any query kindly check our [contributor guidelines](https://github.com/krishnaacharyaa/wanderlust/blob/main/.github/CONTRIBUTING.md).' env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.PAT_TOKEN }} - name: Reopen PR if title is corrected if: github.event.action == 'edited' && success() @@ -50,4 +50,4 @@ jobs: gh pr reopen ${{ github.event.pull_request.number }} -R ${{ github.repository }} fi env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.PAT_TOKEN }} From 5db8eb229cd2f406874f0d98ba23bfe0a7a2151e Mon Sep 17 00:00:00 2001 From: Ameer jafar Date: Tue, 21 May 2024 11:07:26 +0530 Subject: [PATCH 4/7] feat: Added some of the logs to find the error --- .github/workflows/pr-title-checker.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-title-checker.yaml b/.github/workflows/pr-title-checker.yaml index 8555869c..ce827e3a 100644 --- a/.github/workflows/pr-title-checker.yaml +++ b/.github/workflows/pr-title-checker.yaml @@ -21,17 +21,26 @@ jobs: - name: Check out code uses: actions/checkout@v2 + - name: Print Debug Information + run: | + echo "GITHUB_EVENT_NAME: ${{ github.event_name }}" + echo "PR Number: ${{ github.event.pull_request.number }}" + echo "Repository: ${{ github.repository }}" + echo "Event Action: ${{ github.event.action }}" + echo "Actor: ${{ github.actor }}" + - name: Run PR Title Checker id: title-check uses: thehanimo/pr-title-checker@v1.4.1 with: - GH_TOKEN: ${{ secrets.PAT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} pass_on_octokit_error: false configuration_path: .github/pr-title-checker-config.json - - name: pt title satisfied + + - name: PR title satisfied if: success() run: | - gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body "Thank you ${{github.actor}}! Your PR title meets our guidelines." + gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body "Thank you ${{ github.actor }}! Your PR title meets our guidelines." env: GH_TOKEN: ${{ secrets.PAT_TOKEN }} @@ -39,7 +48,7 @@ jobs: if: failure() run: | gh pr close ${{ github.event.pull_request.number }} -R ${{ github.repository }} - gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body $'Hello ${{github.actor}} Thank you for your PR. Unfortunately, it doesn\'t meet our quality checks.\n\nPlease ensure you follow our contribution guidelines. The PR title should match the required format.\n\nFor example, it should be like: `fix-#124: Added responsiveness to the Home page screen.`\n\nIf you have any query kindly check our [contributor guidelines](https://github.com/krishnaacharyaa/wanderlust/blob/main/.github/CONTRIBUTING.md).' + gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body $'Hello ${{ github.actor }} Thank you for your PR. Unfortunately, it doesn\'t meet our quality checks.\n\nPlease ensure you follow our contribution guidelines. The PR title should match the required format.\n\nFor example, it should be like: `fix-#124: Added responsiveness to the Home page screen.`\n\nIf you have any query kindly check our [contributor guidelines](https://github.com/krishnaacharyaa/wanderlust/blob/main/.github/CONTRIBUTING.md).' env: GH_TOKEN: ${{ secrets.PAT_TOKEN }} From 1186d156bb2132d6725207f1cd2397e1761db963 Mon Sep 17 00:00:00 2001 From: Ameer jafar Date: Tue, 21 May 2024 11:12:07 +0530 Subject: [PATCH 5/7] feat: Added some more logs --- .github/workflows/pr-title-checker.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-title-checker.yaml b/.github/workflows/pr-title-checker.yaml index ce827e3a..d6986846 100644 --- a/.github/workflows/pr-title-checker.yaml +++ b/.github/workflows/pr-title-checker.yaml @@ -42,7 +42,7 @@ jobs: run: | gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body "Thank you ${{ github.actor }}! Your PR title meets our guidelines." env: - GH_TOKEN: ${{ secrets.PAT_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Close PR if title is invalid if: failure() @@ -50,7 +50,7 @@ jobs: gh pr close ${{ github.event.pull_request.number }} -R ${{ github.repository }} gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body $'Hello ${{ github.actor }} Thank you for your PR. Unfortunately, it doesn\'t meet our quality checks.\n\nPlease ensure you follow our contribution guidelines. The PR title should match the required format.\n\nFor example, it should be like: `fix-#124: Added responsiveness to the Home page screen.`\n\nIf you have any query kindly check our [contributor guidelines](https://github.com/krishnaacharyaa/wanderlust/blob/main/.github/CONTRIBUTING.md).' env: - GH_TOKEN: ${{ secrets.PAT_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Reopen PR if title is corrected if: github.event.action == 'edited' && success() @@ -59,4 +59,4 @@ jobs: gh pr reopen ${{ github.event.pull_request.number }} -R ${{ github.repository }} fi env: - GH_TOKEN: ${{ secrets.PAT_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 52b368a5fb039a5c099b0dc2e7d9e5540fa0a5b6 Mon Sep 17 00:00:00 2001 From: Ameer jafar Date: Tue, 21 May 2024 11:24:09 +0530 Subject: [PATCH 6/7] feat: Added some more logs --- .github/workflows/pr-title-checker.yaml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr-title-checker.yaml b/.github/workflows/pr-title-checker.yaml index d6986846..27c862f8 100644 --- a/.github/workflows/pr-title-checker.yaml +++ b/.github/workflows/pr-title-checker.yaml @@ -1,6 +1,6 @@ name: 'PR Title Checker' on: - pull_request: + pull_request_target: types: - opened - synchronize @@ -18,9 +18,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v2 - - name: Print Debug Information run: | echo "GITHUB_EVENT_NAME: ${{ github.event_name }}" @@ -31,9 +28,9 @@ jobs: - name: Run PR Title Checker id: title-check - uses: thehanimo/pr-title-checker@v1.4.1 + uses: thehanimo/pr-title-checker@v1.3.7 with: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} pass_on_octokit_error: false configuration_path: .github/pr-title-checker-config.json @@ -42,7 +39,7 @@ jobs: run: | gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body "Thank you ${{ github.actor }}! Your PR title meets our guidelines." env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Close PR if title is invalid if: failure() @@ -50,7 +47,7 @@ jobs: gh pr close ${{ github.event.pull_request.number }} -R ${{ github.repository }} gh issue comment ${{ github.event.pull_request.number }} -R ${{ github.repository }} --body $'Hello ${{ github.actor }} Thank you for your PR. Unfortunately, it doesn\'t meet our quality checks.\n\nPlease ensure you follow our contribution guidelines. The PR title should match the required format.\n\nFor example, it should be like: `fix-#124: Added responsiveness to the Home page screen.`\n\nIf you have any query kindly check our [contributor guidelines](https://github.com/krishnaacharyaa/wanderlust/blob/main/.github/CONTRIBUTING.md).' env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Reopen PR if title is corrected if: github.event.action == 'edited' && success() @@ -59,4 +56,4 @@ jobs: gh pr reopen ${{ github.event.pull_request.number }} -R ${{ github.repository }} fi env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 83e12e66e44a39b4a77652959e66ea868bf5f262 Mon Sep 17 00:00:00 2001 From: Ameer jafar Date: Tue, 21 May 2024 11:27:06 +0530 Subject: [PATCH 7/7] feat: Added some more logs --- .github/workflows/pr-title-checker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-title-checker.yaml b/.github/workflows/pr-title-checker.yaml index 27c862f8..32b59bdf 100644 --- a/.github/workflows/pr-title-checker.yaml +++ b/.github/workflows/pr-title-checker.yaml @@ -1,6 +1,6 @@ name: 'PR Title Checker' on: - pull_request_target: + pull_request: types: - opened - synchronize