Skip to content

Commit 8c1cf5f

Browse files
committed
Updated workflows
fixed the permission and proper events, this events changes might led to security concerns. But for as of now, this might resolve the issue of workflow not working properly for the PRs made from forked repos.
1 parent 5bc3f94 commit 8c1cf5f

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

.github/workflows/auto-assigner.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ name: Auto Assign
33
on:
44
pull_request:
55
types: [opened, ready_for_review]
6+
pull_request_target:
7+
types: [opened, ready_for_review]
68
issues:
79
types: [opened]
810

11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
915
jobs:
1016
auto-assign:
1117
runs-on: ubuntu-latest

.github/workflows/auto-commentor.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name: Auto-commenter
22

33
on:
44
pull_request:
5-
branches: [main]
6-
types: [closed]
5+
types: [opened, closed]
6+
pull_request_target:
7+
types: [opened, closed]
78

89
permissions:
910
id-token: write
@@ -17,14 +18,13 @@ jobs:
1718
- uses: wow-actions/auto-comment@v1
1819
with:
1920
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20-
2121
pullRequestOpened: |
2222
👋 @{{ author }}
2323
Thank you for raising your pull request.
2424
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
2525
26-
pullRequestClosed: >
27-
👋 @{{ author }} This PR is closed. If you think there's been a mistake, please contact with the maintainer @iamwatchdogs.
26+
pullRequestClosed: |
27+
👋 @{{ author }} This PR is closed. If you think there's been a mistake, please contact the maintainer @iamwatchdogs.
2828
2929
pullRequestMerged: |
30-
Thank you for contributing @{{ author }}, Make sure to check your contribution on [GitHub Pages](grow-with-open-source.github.io/Notebook/ "view contributions").
30+
Thank you for contributing @{{ author }}. Make sure to check your contribution on [GitHub Pages](https://grow-with-open-source.github.io/Notebook/ "view contributions").

.github/workflows/auto-labeler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ name: hacktoberfest-labeler
33
on:
44
pull_request:
55
types: [opened, reopened, closed]
6+
pull_request_target:
7+
types: [opened, reopened, closed]
8+
9+
10+
permissions:
11+
contents: read
12+
pull-requests: write
613

714
jobs:
815
auto-labeler:

0 commit comments

Comments
 (0)