2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-11-26 13:30:30 +00:00
bazel-lib/.github/workflows/new_issue.yaml
renovate[bot] 1747382401
chore(deps): update actions/github-script action to v7 (#759)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-26 17:34:30 -08:00

32 lines
1.2 KiB
YAML

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