Skip to content

Add triage workflow #2666

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 25 days ago

To fix the issue, add a permissions block to the workflow. Since the workflow interacts with issues and projects, the minimal required permissions are contents: read and issues: write. These permissions allow the workflow to read repository contents and modify issues as needed. The permissions block should be added at the job level (add-to-project) to scope it specifically to this job.


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
@@ -11,2 +11,5 @@
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      issues: write
     steps:
EOF
@@ -11,2 +11,5 @@
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
Copilot is powered by AI and may make mistakes. Always verify output.
Loading