Skip to content

Add triage workflow #2654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Add bugs to triage board

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/cloudflare/projects/47
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
Comment on lines +10 to +16

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 22 days ago

To fix the issue, explicitly define a permissions block for the add-to-project job, using the least privileges required for the task. Based on the functionality of the workflow (adding issues to a project), the following permissions are appropriate:

  • contents: read: Required for accessing repository content.
  • issues: write: Required for interacting with issues.

The permissions block should be added under the add-to-project job configuration in .github/workflows/triage.yml.

Suggested changeset 1
.github/workflows/triage.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml
--- a/.github/workflows/triage.yml
+++ b/.github/workflows/triage.yml
@@ -9,6 +9,9 @@
   add-to-project:
     name: Add issue to project
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      issues: write
     steps:
       - uses: actions/[email protected]
         with:
EOF
@@ -9,6 +9,9 @@
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: actions/[email protected]
with:
Copilot is powered by AI and may make mistakes. Always verify output.
Loading