Skip to content

Add TODO issue workflow #517

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: dev
Choose a base branch
from

Conversation

BelfordZ
Copy link
Contributor

Summary

  • automate TODO management via todo-to-issue action
  • document linking TODOs to GitHub issues

Testing

  • npm test

Comment on lines +12 to +17
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: alstr/todo-to-issue-action@v4
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}

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: {contents: read}

Copilot Autofix

AI about 1 month ago

To fix the issue, we need to add a permissions block to the workflow. Since the workflow uses the alstr/todo-to-issue-action@v4 action, which likely interacts with issues, we should grant the minimal required permissions. Based on the action's purpose, it likely needs contents: read to access the repository and issues: write to create or modify issues. These permissions should be added at the workflow level to apply to all jobs unless overridden.

Suggested changeset 1
.github/workflows/todo-issues.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/todo-issues.yml b/.github/workflows/todo-issues.yml
--- a/.github/workflows/todo-issues.yml
+++ b/.github/workflows/todo-issues.yml
@@ -9,2 +9,6 @@
 
+permissions:
+  contents: read
+  issues: write
+
 jobs:
@@ -17,2 +21 @@
           TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
EOF
@@ -9,2 +9,6 @@

permissions:
contents: read
issues: write

jobs:
@@ -17,2 +21 @@
TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copilot is powered by AI and may make mistakes. Always verify output.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: alstr/todo-to-issue-action@v4

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Create TODO Issues' step
Uses Step
uses 'alstr/todo-to-issue-action' with ref 'v4', not a pinned commit hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant