1- name : Add all issues to F# project
1+ name : Add all issues to F# project, assign milestone and labels
22
33on :
44 issues :
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- 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