generated from bazel-contrib/rules-template
-
-
Notifications
You must be signed in to change notification settings - Fork 30
31 lines (31 loc) · 1.16 KB
/
new_issue.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: New issue
on:
issues:
types:
- opened
- reopened
jobs:
new_issue:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
# https://docs.github.com/en/actions/managing-issues-and-pull-requests/adding-labels-to-issues
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["untriaged"]
})
# https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects#adding-an-item-to-a-project
- run: |
gh api graphql -f query="mutation { addProjectV2ItemById(input: {projectId: \"$PROJECT_ID\" contentId: \"$CONTENT_ID\"}) { item { id } } }"
env:
GITHUB_TOKEN: ${{ secrets.GH_PROJECTS_RW_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
CONTENT_ID: ${{ github.event.issue.node_id }}
PROJECT_ID: PVT_kwDOA6IKMs4ALj2o # Aspect OSS Bazel Rules