fix(ci): stop TODO scanner from matching its own workflow comments#15
Merged
Conversation
The todos.yaml job-level permission comments contained the literal word "TODO", which alstr/todo-to-issue-action matches as task comments. On every push this opened two junk tracking issues (titled "tracking issues" and "comments") from the workflow's own documentation. Reword the comments so they no longer contain the scanner's identifier. As a template, every generated repo inherited this noise. > 🤖 Generated by the Daily AI Assistant
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
Adjusts inline comments in the TODO-scanning GitHub Actions workflow so the alstr/todo-to-issue-action scanner no longer matches its own workflow permission comments and opens junk tracking issues in template-derived repos.
Changes:
- Reworded the
contents: readpermission comment to avoid the literalTODOtoken. - Reworded the
issues: writepermission comment to avoid the literalTODOtoken while keeping intent/clarity.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The TODO-scanning workflow (
.github/workflows/todos.yaml) opens a tracking issue for everyTODOcomment it finds viaalstr/todo-to-issue-action. That action matches the literal tokenTODOin any comment.When this repo moved its workflow permissions to the job level, it added two inline documentation comments that themselves contain the word
TODO:So on every push to
mainthe scanner matched its own workflow and opened two junk tracking issues — #1 "tracking issues" (from...maintain **TODO** tracking issues) and #2 "comments" (from...scan for **TODO** comments). The upstreamplatformrepo avoids this by declaring permissions at the workflow level with no inline comments and therefore has no such issues.Because this is a template, every repository generated from it inherits the same two junk issues.
Fix
Reword the two job-level permission comments so they no longer contain the scanner's
TODOidentifier, while keeping the (good, least-privilege) job-level permission scoping:Effect
# TODO:comments in real source files are unaffected and still tracked.Notes
# TODO: Remove auth-proxy…comment that appears in five separate config files — that is the action creating one issue per occurrence, a separate concern from this self-match bug.