1515 label-on-content :
1616 name : π·οΈ Label Issues by Content
1717 runs-on : ubuntu-latest
18+ if : always()
1819
1920 steps :
21+ - name : Mint App Token
22+ id : app
23+ # Create a GitHub App token
24+ # https://github.com/marketplace/actions/create-github-app-token
25+ uses : actions/create-github-app-token@v2
26+ with :
27+ app-id : ${{ vars.ST_BOT_APP_ID }}
28+ private-key : ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+ owner : ${{ github.repository_owner }}
30+
2031 - name : Checkout Repository
2132 # Checkout
2233 # https://github.com/marketplace/actions/checkout
@@ -32,21 +43,33 @@ jobs:
3243 with :
3344 configuration-path : .github/issues-auto-labels.yml
3445 enable-versioned-regex : 0
35- repo-token : ${{ secrets.GITHUB_TOKEN }}
46+ repo-token : ${{ steps.app.outputs.token }}
3647
3748 label-on-labels :
3849 name : π·οΈ Label Issues by Labels
50+ needs : [label-on-content]
3951 runs-on : ubuntu-latest
52+ if : always()
4053
4154 steps :
55+ - name : Mint App Token
56+ id : app
57+ # Create a GitHub App token
58+ # https://github.com/marketplace/actions/create-github-app-token
59+ uses : actions/create-github-app-token@v2
60+ with :
61+ app-id : ${{ vars.ST_BOT_APP_ID }}
62+ private-key : ${{ secrets.ST_BOT_PRIVATE_KEY }}
63+ owner : ${{ github.repository_owner }}
64+
4265 - name : β
Add "π Approved" for relevant labels
4366 if : contains(fromJSON('["π©βπ» Good First Issue", "π Help Wanted", "πͺ² Confirmed", "β οΈ High Priority", "β Medium Priority", "π€ Low Priority"]'), github.event.label.name)
4467 # π€ Issues Helper
4568 # https://github.com/marketplace/actions/issues-helper
4669 uses :
actions-cool/[email protected] 4770 with :
4871 actions : ' add-labels'
49- token : ${{ secrets.GITHUB_TOKEN }}
72+ token : ${{ steps.app.outputs.token }}
5073 labels : ' π Approved'
5174
5275 - name : β Remove progress labels when issue is marked done or stale
5679 uses :
actions-cool/[email protected] 5780 with :
5881 actions : ' remove-labels'
59- token : ${{ secrets.GITHUB_TOKEN }}
82+ token : ${{ steps.app.outputs.token }}
6083 labels : ' π§βπ» In Progress,π€ Unsure,π€ Under Consideration'
6184
6285 - name : β Remove temporary labels when confirmed labels are added
6689 uses :
actions-cool/[email protected] 6790 with :
6891 actions : ' remove-labels'
69- token : ${{ secrets.GITHUB_TOKEN }}
92+ token : ${{ steps.app.outputs.token }}
7093 labels : ' π€ Unsure,π€ Under Consideration'
7194
7295 - name : β Remove no bug labels when "πͺ² Confirmed" is added
@@ -76,32 +99,54 @@ jobs:
7699 uses :
actions-cool/[email protected] 77100 with :
78101 actions : ' remove-labels'
79- token : ${{ secrets.GITHUB_TOKEN }}
102+ token : ${{ steps.app.outputs.token }}
80103 labels : ' βοΈ Not Reproducible,βοΈ Not A Bug'
81104
82105 remove-stale-label :
83106 name : ποΈ Remove Stale Label on Comment
107+ needs : [label-on-content, label-on-labels]
84108 runs-on : ubuntu-latest
85109 # Only run this on new comments, to automatically remove the stale label
86- if : github.event_name == 'issue_comment' && github.actor != 'github-actions[bot]'
110+ if : always() && ( github.event_name == 'issue_comment' && github.event.sender.type != 'Bot')
87111
88112 steps :
113+ - name : Mint App Token
114+ id : app
115+ # Create a GitHub App token
116+ # https://github.com/marketplace/actions/create-github-app-token
117+ uses : actions/create-github-app-token@v2
118+ with :
119+ app-id : ${{ vars.ST_BOT_APP_ID }}
120+ private-key : ${{ secrets.ST_BOT_PRIVATE_KEY }}
121+ owner : ${{ github.repository_owner }}
122+
89123 - name : Remove Stale Label
90124 # π€ Issues Helper
91125 # https://github.com/marketplace/actions/issues-helper
92126 uses :
actions-cool/[email protected] 93127 with :
94128 actions : ' remove-labels'
95- token : ${{ secrets.GITHUB_TOKEN }}
129+ token : ${{ steps.app.outputs.token }}
96130 issue-number : ${{ github.event.issue.number }}
97131 labels : ' β°οΈ Stale,πΈοΈ Inactive,π Awaiting User Response,π No Response'
98132
99133 write-auto-comments :
100134 name : π¬ Post Issue Comments Based on Labels
101- needs : [label-on-content, label-on-labels]
135+ needs : [label-on-content, label-on-labels, remove-stale-label ]
102136 runs-on : ubuntu-latest
137+ if : always()
103138
104139 steps :
140+ - name : Mint App Token
141+ id : app
142+ # Create a GitHub App token
143+ # https://github.com/marketplace/actions/create-github-app-token
144+ uses : actions/create-github-app-token@v2
145+ with :
146+ app-id : ${{ vars.ST_BOT_APP_ID }}
147+ private-key : ${{ secrets.ST_BOT_PRIVATE_KEY }}
148+ owner : ${{ github.repository_owner }}
149+
105150 - name : Checkout Repository
106151 # Checkout
107152 # https://github.com/marketplace/actions/checkout
@@ -113,4 +158,4 @@ jobs:
113158114159 with :
115160 config_file : .github/issues-auto-comments.yml
116- github_token : ${{ secrets.GITHUB_TOKEN }}
161+ github_token : ${{ steps.app.outputs.token }}
0 commit comments