Skip to content
Open
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions .github/workflows/todo-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Create TODO Issues

on:
push:
branches:
- dev
- main
workflow_dispatch:

jobs:
todo-issues:
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
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +12 to +17

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 11 months 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.

18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,21 @@ This command will guide you through the steps necessary to release the package.
## Contributing

Contributions are very welcome! Everyone interacting in our codebases, issue trackers, and any other form of communication, including chat rooms and mailing lists, is expected to follow our [code of conduct](./CODE_OF_CONDUCT.md) so we can all enjoy the effort we put into this project.

## TODO tracking

This project uses an automated workflow to convert `TODO` comments into GitHub issues.
Whenever you push changes to the `dev` or `main` branches, the **Create TODO Issues**
GitHub Action scans the repository for `TODO:` markers and opens issues for any
new entries.

If you already have an issue that relates to a TODO, reference the issue number
directly in the comment so it links back to the code location:

```ts
// TODO(#123): handle reconnect logic
```

Linking code and issues in this way keeps outstanding work visible and easy to
track.