Skip to content

Commit 8cca6cc

Browse files
authored
Update add_to_project.yml
1 parent b3f1959 commit 8cca6cc

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

.github/workflows/add_to_project.yml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Add all issues to F# project
1+
name: Add all issues to F# project, assign milestone and labels
22

33
on:
44
issues:
@@ -25,7 +25,7 @@ jobs:
2525
gh api -X GET "$_UrlPath/$_CurrentWorkflowID/runs" --paginate \
2626
| jq '.workflow_runs[] | select(.status == "completed") | .id' \
2727
| xargs -I{} gh api -X DELETE "/repos/$GITHUB_REPOSITORY/actions/runs"/{}
28-
add-to-project:
28+
add_to_project:
2929
name: Add issue to project
3030
runs-on: ubuntu-latest
3131
permissions:
@@ -36,13 +36,27 @@ jobs:
3636
with:
3737
project-url: https://github.com/orgs/dotnet/projects/126/
3838
github-token: ${{ secrets.REPO_PROJECT_PAT }}
39-
label_issues:
40-
runs-on: ubuntu-latest
41-
permissions:
42-
issues: write
43-
steps:
44-
- name: Label issues
45-
uses: actions/[email protected]
46-
with:
47-
add-labels: "Needs-Triage"
48-
repo-token: ${{ secrets.GITHUB_TOKEN }}
39+
apply-label:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/github-script@v6
43+
with:
44+
script: |
45+
github.rest.issues.addLabels({
46+
issue_number: context.issue.number,
47+
owner: context.repo.owner,
48+
repo: context.repo.repo,
49+
labels: ['Needs-Triage']
50+
})
51+
apply-milestone:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/github-script@v6
55+
with:
56+
script: |
57+
github.rest.issues.update({
58+
issue_number: context.issue.number,
59+
owner: context.repo.owner,
60+
repo: context.repo.repo,
61+
milestone: 29
62+
})

0 commit comments

Comments
 (0)