ci(workflows): fix add-to-project action reference (Closes #51)#54
ci(workflows): fix add-to-project action reference (Closes #51)#54
Conversation
WalkthroughAdds a projects mapping to multiple issue templates linking them to Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User as "User (creates issue)"
participant Templates as "Issue Template (projects)"
participant GitHub as "GitHub Issues"
participant Workflow as "add-to-project.yml (action)"
rect rgb(230,245,255)
Note right of Templates: New `projects` entry points to workflow
end
User->>GitHub: Submit issue (uses template)
GitHub->>Workflow: Trigger `.github/workflows/add-to-project.yml` (projects automation)
Workflow->>Workflow: runs `actions/add-to-project@v0.5.0` with `PROJECT_TOKEN`
alt success
Workflow->>GitHub: Add issue to project via project-url
else failure
Workflow->>GitHub: Emit error/failed job
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/add-to-project.yml (3)
11-12: Pin to a commit SHA and move to the latest stable (v1.0.2).v0.5.0 is behind the latest v1 line. For supply‑chain hardening, pin by full commit SHA for v1.0.2. This also ensures Node 20 compatibility going forward.
- - name: Add to project - uses: actions/add-to-project@v0.5.0 + - name: Add to project + uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2Refs: latest release v1.0.2 and commit SHA, and Node20 enforcement for actions. (github.com)
15-15: Add a trailing newline (YAMLlint).CI lint hint flags “no new line at end of file”. Add a final newline.
- github-token: ${{ secrets.PROJECT_TOKEN }} # PAT with repo + project scopes + github-token: ${{ secrets.PROJECT_TOKEN }} # PAT with repo + project scopes +
11-12: Optional hardening: disable the default GITHUB_TOKEN for this job.You’re using a PAT; explicitly set minimal job permissions so the default GITHUB_TOKEN has no privileges.
Example (outside this hunk):
jobs: add: permissions: {} runs-on: ubuntu-latest steps: - name: Add to project uses: actions/add-to-project@<pinned-sha> with: project-url: https://github.com/users/thenarfer/projects/1 github-token: ${{ secrets.PROJECT_TOKEN }}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/add-to-project.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/add-to-project.yml
[error] 15-15: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (2)
.github/workflows/add-to-project.yml (2)
11-12: LGTM: removing the “fields” input is correct.This action doesn’t take a “fields” input; default status/column is configured in the Project UI, not via YAML. Good cleanup.
Refs. (github.com)
15-15: Good switch to a scoped PAT; verify minimal scopes.PROJECT_TOKEN aligns with the action’s requirement. Ensure it’s fine‑grained, scoped to this repo, with Organization “projects: read & write” and Repository “issues: read‑only” and “pull requests: read‑only” (or classic PAT with project + repo).
Refs. (github.com)
There was a problem hiding this comment.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/ISSUE_TEMPLATE/bug.yml(1 hunks).github/ISSUE_TEMPLATE/feature.yml(1 hunks).github/ISSUE_TEMPLATE/sprint-plan.yml(1 hunks).github/ISSUE_TEMPLATE/tech-debt.yml(1 hunks)
| projects: | ||
| - url: https://github.com/users/thenarfer/projects/1 | ||
| workflow: .github/workflows/add-to-project.yml |
There was a problem hiding this comment.
🧩 Analysis chain
Fix projects schema; remove unsupported workflow mapping
Issue forms expect projects to be a list of strings in the format OWNER/NUMBER. Nested objects with url and workflow are not supported and will be ignored/invalid. Update to the supported form and let your GitHub Action trigger on issues events (no template→workflow mapping exists). (docs.github.com)
Apply this diff:
-projects:
- - url: https://github.com/users/thenarfer/projects/1
- workflow: .github/workflows/add-to-project.yml
+projects:
+ - thenarfer/1Also ensure your workflow step uses:
with:
project-url: https://github.com/users/thenarfer/projects/1
github-token: ${{ secrets.PROJECT_TOKEN }}(input name is github-token, secret name can be PROJECT_TOKEN). (github.com)
🏁 Script executed:
#!/bin/bash
# Show any invalid 'projects:' entries using object items (url/workflow).
rg -nC2 $'^projects:\\s*$\\n\\s*-\\s+url:' .github/ISSUE_TEMPLATELength of output: 191
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "PWD: $(pwd)"
echo
echo "Listing .github/ISSUE_TEMPLATE (if present):"
if [ -d .github/ISSUE_TEMPLATE ]; then
ls -la .github/ISSUE_TEMPLATE || true
else
echo " (directory not found)"
fi
echo
echo "Searching for 'projects:' entries in .github/ISSUE_TEMPLATE:"
rg -n --hidden -S '^\s*projects\s*:' .github/ISSUE_TEMPLATE || true
echo
echo "Searching for '- url:' or 'url:' patterns in .github/ISSUE_TEMPLATE:"
rg -n --hidden -S '^\s*-\s*url\s*:' .github/ISSUE_TEMPLATE || true
rg -n --hidden -S '^\s*url\s*:' .github/ISSUE_TEMPLATE || true
echo
if [ -f .github/ISSUE_TEMPLATE/bug.yml ]; then
echo "--- .github/ISSUE_TEMPLATE/bug.yml (first 200 lines, numbered) ---"
nl -ba -w3 -s': ' .github/ISSUE_TEMPLATE/bug.yml | sed -n '1,200p'
else
echo "No .github/ISSUE_TEMPLATE/bug.yml file found"
fiLength of output: 1584
Fix projects schema in issue templates — remove unsupported object entries and workflow mapping
Issue forms require projects as OWNER/NUMBER strings (e.g., thenarfer/1); nested objects with url + workflow are invalid and will be ignored.
- Affected files (replace the projects block in each):
- .github/ISSUE_TEMPLATE/bug.yml (lines 41–42)
- .github/ISSUE_TEMPLATE/feature.yml (lines 27–28)
- .github/ISSUE_TEMPLATE/sprint-plan.yml (lines 22–23)
- .github/ISSUE_TEMPLATE/tech-debt.yml (lines 25–26)
Replace blocks like:
-projects:
- - url: https://github.com/users/thenarfer/projects/1
- workflow: .github/workflows/add-to-project.yml
+projects:
+ - thenarfer/1Ensure the workflow step uses:
with:
project-url: https://github.com/users/thenarfer/projects/1
github-token: ${{ secrets.PROJECT_TOKEN }}🤖 Prompt for AI Agents
In .github/ISSUE_TEMPLATE/bug.yml around lines 41–43, the projects entry uses an
unsupported object with url and workflow; replace that block with the
OWNER/NUMBER string format (e.g., thenarfer/1). Apply the same change to the
other affected templates (.github/ISSUE_TEMPLATE/feature.yml lines ~27–28,
sprint-plan.yml ~22–23, tech-debt.yml ~25–26). Remove any nested workflow
mapping from the templates; ensure the project workflow step instead uses the
workflow file’s with: inputs (project-url:
https://github.com/users/thenarfer/projects/1 and github-token: ${{
secrets.PROJECT_TOKEN }}) in your .github/workflows/add-to-project.yml.
| projects: | ||
| - url: https://github.com/users/thenarfer/projects/1 | ||
| workflow: .github/workflows/add-to-project.yml |
There was a problem hiding this comment.
🛠️ Refactor suggestion
🧩 Analysis chain
Schema mismatch: projects must be OWNER/NUMBER; no workflow link
Switch to the supported list-of-strings format; your workflow should be triggered via on: issues with github-token set to your secrets.PROJECT_TOKEN. (docs.github.com)
-projects:
- - url: https://github.com/users/thenarfer/projects/1
- workflow: .github/workflows/add-to-project.yml
+projects:
+ - thenarfer/1🏁 Script executed:
#!/bin/bash
# Verify action input name in workflow is 'github-token' (not 'PROJECT_TOKEN').
rg -nP 'uses:\\s*actions/add-to-project@|github-token\\s*:' .github/workflows/add-to-project.ymlLength of output: 0
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== repo root: $(pwd) ==="
echo "--- .github directory listing ---"
if [ -d ".github" ]; then find .github -maxdepth 4 -type f -printf "%p\n" || true; else echo "MISSING: .github directory"; fi
echo
echo "--- show .github/ISSUE_TEMPLATE/feature.yml (if present) ---"
if [ -f ".github/ISSUE_TEMPLATE/feature.yml" ]; then
nl -ba .github/ISSUE_TEMPLATE/feature.yml | sed -n '1,200p'
else
echo "MISSING: .github/ISSUE_TEMPLATE/feature.yml"
fi
echo
echo "--- show .github/workflows/add-to-project.yml (if present) ---"
if [ -f ".github/workflows/add-to-project.yml" ]; then
nl -ba .github/workflows/add-to-project.yml | sed -n '1,300p'
else
echo "MISSING: .github/workflows/add-to-project.yml"
fi
echo
echo "--- rg search in .github for relevant patterns ---"
rg -n --hidden --no-ignore -S 'projects:|workflow:|add-to-project|github-token|PROJECT_TOKEN|project-url|project-id' .github || trueLength of output: 1026
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== repo root: $(pwd) ==="
echo
if [ -f ".github/ISSUE_TEMPLATE/feature.yml" ]; then
echo "--- .github/ISSUE_TEMPLATE/feature.yml (lines 1-200) ---"
sed -n '1,200p' .github/ISSUE_TEMPLATE/feature.yml || true
else
echo "MISSING: .github/ISSUE_TEMPLATE/feature.yml"
fi
echo
if [ -f ".github/workflows/add-to-project.yml" ]; then
echo "--- .github/workflows/add-to-project.yml (lines 1-400) ---"
sed -n '1,400p' .github/workflows/add-to-project.yml || true
else
echo "MISSING: .github/workflows/add-to-project.yml"
fi
echo
echo "--- rg matches (.github) ---"
rg -n --hidden --no-ignore -S 'projects:|workflow:|uses:\s*actions/add-to-project@|github-token|PROJECT_TOKEN|on:\s*issues' .github || trueLength of output: 4846
Fix issue form 'projects' schema — use OWNER/NUMBER (remove url/workflow)
GitHub issue forms require projects to be a list of OWNER/NUMBER strings; the url+workflow object is not valid. The workflow (.github/workflows/add-to-project.yml) already triggers on issues and uses github-token: ${{ secrets.PROJECT_TOKEN }} — only the template needs updating.
-projects:
- - url: https://github.com/users/thenarfer/projects/1
- workflow: .github/workflows/add-to-project.yml
+projects:
+ - thenarfer/1📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| projects: | |
| - url: https://github.com/users/thenarfer/projects/1 | |
| workflow: .github/workflows/add-to-project.yml | |
| projects: | |
| - thenarfer/1 |
🤖 Prompt for AI Agents
.github/ISSUE_TEMPLATE/feature.yml around lines 27 to 29: the projects entry is
currently an object with url and workflow which is invalid for GitHub issue
forms; replace that object with a list of OWNER/NUMBER strings (e.g.
"thenarfer/1"), removing the url and workflow keys so the projects field is a
simple array of project identifiers.
| projects: | ||
| - url: https://github.com/users/thenarfer/projects/1 | ||
| workflow: .github/workflows/add-to-project.yml |
There was a problem hiding this comment.
🧩 Analysis chain
Correct the projects entry to string list
GitHub expects projects: ["OWNER/NUMBER"]. The url/workflow mapping is invalid here. (docs.github.com)
-projects:
- - url: https://github.com/users/thenarfer/projects/1
- workflow: .github/workflows/add-to-project.yml
+projects:
+ - thenarfer/1🏁 Script executed:
#!/bin/bash
# Ensure only allowed keys exist at top-level in templates.
rg -nP '^(projects:\\s*$|\\s*-\\s*url:|\\s*workflow:)' .github/ISSUE_TEMPLATELength of output: 0
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "PWD: $(pwd)"
echo "Listing .github directory (if present)"
ls -la .github || true
echo
echo "Listing .github/ISSUE_TEMPLATE (if present)"
ls -la .github/ISSUE_TEMPLATE || true
echo
echo "Check exact path .github/ISSUE_TEMPLATE/sprint-plan.yml"
if [ -f ".github/ISSUE_TEMPLATE/sprint-plan.yml" ]; then
echo "---- .github/ISSUE_TEMPLATE/sprint-plan.yml ----"
sed -n '1,400p' .github/ISSUE_TEMPLATE/sprint-plan.yml
exit 0
fi
echo
echo "File not found at that path. Searching repo for files named sprint-plan.* and for occurrences of 'projects:'"
rg -n --hidden -S 'sprint-plan' || true
rg -n --hidden -S '^\s*projects\s*:' || true
echo
echo "Listing any YAML files under .github to inspect"
find .github -type f \( -name '*.yml' -o -name '*.yaml' \) -print -exec sh -c 'echo "---- {} ----"; sed -n "1,200p" "{}"' \; || true
echo
echo "If the above finds nothing, rerun with a path you expect or provide file content for verification."Length of output: 4595
Fix projects entry to use OWNER/NUMBER string list
Issue forms require projects to be an array of strings in the format PROJECT-OWNER/PROJECT-NUMBER; the current url/workflow mapping is unsupported. (docs.github.com)
File: .github/ISSUE_TEMPLATE/sprint-plan.yml (around lines 22–24)
-projects:
- - url: https://github.com/users/thenarfer/projects/1
- workflow: .github/workflows/add-to-project.yml
+projects:
+ - thenarfer/1📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| projects: | |
| - url: https://github.com/users/thenarfer/projects/1 | |
| workflow: .github/workflows/add-to-project.yml | |
| projects: | |
| - thenarfer/1 |
🤖 Prompt for AI Agents
In .github/ISSUE_TEMPLATE/sprint-plan.yml around lines 22 to 24, the projects
entry currently uses a url/workflow mapping which is unsupported; replace it
with a projects array of OWNER/NUMBER strings (e.g. "thenarfer/1") — update the
YAML to list projects: - "thenarfer/1" (and remove the url/workflow mapping),
ensuring the field is an array of strings in OWNER/NUMBER format as required by
GitHub issue templates.
| projects: | ||
| - url: https://github.com/users/thenarfer/projects/1 | ||
| workflow: .github/workflows/add-to-project.yml |
There was a problem hiding this comment.
🧩 Analysis chain
Use supported projects format; drop inline workflow reference
Replace the object with a string entry thenarfer/1. Referencing a workflow from the template is not supported; run the action on issues events instead. (docs.github.com)
-projects:
- - url: https://github.com/users/thenarfer/projects/1
- workflow: .github/workflows/add-to-project.yml
+projects:
+ - thenarfer/1🏁 Script executed:
#!/bin/bash
# Quick sanity check that only string entries remain under 'projects:'.
rg -nPA1 $'^projects:\\s*$' .github/ISSUE_TEMPLATE | sed -n 'p;n;p'Length of output: 576
Use supported projects format; drop inline workflow reference
Replace each projects object (url + workflow) with a single string entry thenarfer/1. Issue templates cannot reference workflows — remove the workflow key and trigger the action on issues events instead.
Affected files (lines shown from verification):
- .github/ISSUE_TEMPLATE/tech-debt.yml (25-27)
- .github/ISSUE_TEMPLATE/sprint-plan.yml (22-23)
- .github/ISSUE_TEMPLATE/feature.yml (27-28)
- .github/ISSUE_TEMPLATE/bug.yml (41-42)
-projects:
- - url: https://github.com/users/thenarfer/projects/1
- workflow: .github/workflows/add-to-project.yml
+projects:
+ - thenarfer/1📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| projects: | |
| - url: https://github.com/users/thenarfer/projects/1 | |
| workflow: .github/workflows/add-to-project.yml | |
| projects: | |
| - thenarfer/1 |
🤖 Prompt for AI Agents
In .github/ISSUE_TEMPLATE/tech-debt.yml around lines 25-27, the projects entry
uses an object with url and workflow which is unsupported; replace that object
with a single string "thenarfer/1" (drop the workflow key) and update your
actions to trigger on issues events instead of relying on inline workflow
references; apply the same change to .github/ISSUE_TEMPLATE/sprint-plan.yml
(lines ~22-23), .github/ISSUE_TEMPLATE/feature.yml (lines ~27-28) and
.github/ISSUE_TEMPLATE/bug.yml (lines ~41-42).

name: "Tech Debt / Chore PR"
about: "Refactor, cleanups, dep bumps, infra chores"
chore(workflow): Update GitHub project automation workflow
Why now
Risk reduction / maintainability / dev-ergonomics.
Scope
Updates the GitHub workflow for adding issues to projects with improved configuration.
Change
actions/add-to-projectaction to specific versionv0.5.0instead of major versionv1GITHUB_TOKENwithPROJECT_TOKENthat has proper scopes (repo + project)Validation
Evidence (before/after, logs, links)
The workflow will now use a properly scoped token and a pinned version of the action for better stability.
—
See
docs/DoR.md&docs/DoD.md.Closes #51
Closes #55
Summary by CodeRabbit