File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed
Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 22name : Issue Labels
33
44on :
5+ workflow_dispatch :
6+ inputs :
7+ issue_body :
8+ description : " The issue body"
9+ required : false
10+ type : string
511 issues :
612 types : [opened]
713
@@ -18,10 +24,12 @@ jobs:
1824 template : [ 000-bug-report.yml, 001-feature-request.yml ]
1925 steps :
2026 - uses : actions/checkout@v4
27+
2128 - name : Parse issue form
2229 uses : stefanbuck/github-issue-parser@v3
2330 id : issue-parser
2431 with :
32+ issue-body : ${{ github.event.issue?.body ?? inputs.issue_body }}
2533 template-path : .github/ISSUE_TEMPLATE/${{ matrix.template }}
2634
2735 - name : Set labels based on mc-version field
Original file line number Diff line number Diff line change 1+ # Manages labels on new issues
2+ name : Retroactively apply Issue Labels
3+
4+ on :
5+ workflow_dispatch :
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ label-all :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ issues : write # IDK if this is needed to run manage-issue-labels, but it doesn't hurt so
15+ actions : write
16+ steps :
17+ - name : Labelifier
18+ uses : actions/github-script@v7
19+ id : label-em
20+ with :
21+ script : |
22+ github.paginate(github.rest.issues.listForRepo, {
23+ owner: "GregTechCEu",
24+ repo: "GregTech-Modern",
25+ }).then((issues) => {
26+ // issues is an array of all issue objects
27+ issues.forEach((issue) => {
28+ if (issue.pull_request != undefined) {
29+ // if it's a pull request, skip it.
30+ return;
31+ }
32+ octokit.rest.actions.createWorkflowDispatch({
33+ owner: "GregTechCEu",
34+ repo: "GregTech-Modern",
35+ workflow_id: "manage-issue-labels",
36+ ref: ${{ github.ref }},
37+ inputs: {
38+ issue_number: issue.body
39+ }
40+ });
41+ });
42+ });
You can’t perform that action at this time.
0 commit comments