Skip to content

Commit 8df07a7

Browse files
authored
CI: Update the check if issue exists workflow (#1379)
1 parent fa49749 commit 8df07a7

File tree

4 files changed

+5
-85
lines changed

4 files changed

+5
-85
lines changed

.github/actions/PR_has_a_valid_issue/Dockerfile

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/actions/PR_has_a_valid_issue/action.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/actions/PR_has_a_valid_issue/main.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/Check if issue exists.yml renamed to .github/workflows/check-if-issue-exists.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,26 @@ jobs:
1111
- uses: actions/checkout@v2
1212

1313
- name: "Issue number validator"
14-
uses: ./.github/actions/PR_has_a_valid_issue/
14+
uses: HarshCasper/[email protected]
1515
id: validator
1616
with:
1717
prbody: ${{ github.event.pull_request.body }}
1818
prurl: ${{ github.event.pull_request.url }}
1919

20-
- name: "Validation action on 1"
20+
- name: PR has a valid Issue
2121
if: ${{ steps.validator.outputs.valid == 1 }}
2222
run: |
23-
echo $Github_Token > mytoken.txt
24-
gh auth login --with-token < mytoken.txt
2523
gh pr edit $PRNUM --add-label "PR:Ready-to-Review"
2624
gh pr edit $PRNUM --remove-label "PR:No-Issue"
27-
rm mytoken.txt
2825
env:
29-
Github_Token: ${{ secrets.GITHUB_TOKEN }}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3027
PRNUM: ${{ github.event.pull_request.number }}
3128

32-
- name: "Validation action on 0"
29+
- name: PR has no valid Issue
3330
if: ${{ steps.validator.outputs.valid == 0 }}
3431
run: |
35-
echo $Github_Token > mytoken.txt
36-
gh auth login --with-token < mytoken.txt
3732
gh pr comment $PRNUM --body "PR is not linked to any issue, please make the corresponding changes in the body. The issue should look like [this](https://ibb.co/Bg9x53w). For help follow this [link](https://github.com/HarshCasper/Rotten-Scripts/blob/master/CONTRIBUTING.md)"
3833
gh pr edit $PRNUM --add-label "PR:No-Issue"
39-
rm mytoken.txt
4034
env:
41-
Github_Token: ${{ secrets.GITHUB_TOKEN }}
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4236
PRNUM: ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)