Skip to content

ci(workflows): fix add-to-project action reference (Closes #51)#54

Merged
thenarfer merged 2 commits intomainfrom
fix/add-to-project-action
Sep 16, 2025
Merged

ci(workflows): fix add-to-project action reference (Closes #51)#54
thenarfer merged 2 commits intomainfrom
fix/add-to-project-action

Conversation

@thenarfer
Copy link
Copy Markdown
Owner

@thenarfer thenarfer commented Sep 16, 2025


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

  • Pin the actions/add-to-project action to specific version v0.5.0 instead of major version v1
  • Replace GITHUB_TOKEN with PROJECT_TOKEN that has proper scopes (repo + project)
  • Remove the Status field configuration that was setting issues to "Backlog"
  • Add descriptive name to the workflow step

Validation

  • No user-visible behavior change
  • User-visible impact: none
  • CI green; tests updated if needed
  • Perf impact considered (none)
  • Security/secrets considered (low: using proper scoped token)
  • Docs updated if user-visible

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

  • Chores
    • Updated project-automation step to a pinned action version, switched to PAT-based authentication, removed deprecated status field, and added a descriptive step name.
  • New Features
    • Issue templates now automatically link new issues to the project via the updated automation, enabling seamless project association for bug, feature, sprint-plan, and tech-debt tickets.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 16, 2025

Walkthrough

Adds a projects mapping to multiple issue templates linking them to .github/workflows/add-to-project.yml, and updates that workflow to use actions/add-to-project@v0.5.0, rename the step, switch to PROJECT_TOKEN (PAT) for auth, and remove the fields input.

Changes

Cohort / File(s) Summary
Workflow: Add to project step update
.github/workflows/add-to-project.yml
Replaces action actions/add-to-project@v1actions/add-to-project@v0.5.0; adds name: Add to project; changes auth input from ${{ secrets.GITHUB_TOKEN }}${{ secrets.PROJECT_TOKEN }} (PAT comment); removes fields input (Status=Backlog); keeps project-url.
Issue templates: add projects mapping
.github/ISSUE_TEMPLATE/bug.yml, .../feature.yml, .../sprint-plan.yml, .../tech-debt.yml
Inserts a top-level projects list with a single item: url: https://github.com/users/thenarfer/projects/1 and workflow: .github/workflows/add-to-project.yml into each template (no other fields changed).

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Suggested labels

type:chore, size:XS, area:process

Poem

I stitched a ribbon on the flow,
A token hugged by paw and brow.
Templates point to project doors,
v0.5.0 hops across the moors.
Bugs and plans, come join the crew—hop now! 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "ci(workflows): fix add-to-project action reference (Closes #51)" accurately and concisely summarizes the primary change in the changeset — updating the add-to-project action reference in the CI workflows — and it includes the linked issue for traceability. It is focused, specific to the main change, and free of noisy details or unrelated file lists. A reviewer scanning history will understand the intent and scope from the title alone.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/add-to-project-action

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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 @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@thenarfer thenarfer marked this pull request as ready for review September 16, 2025 19:46
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.2

Refs: 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6090b55 and 0f982f5.

📒 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)

@thenarfer thenarfer merged commit fad7a26 into main Sep 16, 2025
13 of 14 checks passed
@thenarfer thenarfer deleted the fix/add-to-project-action branch September 16, 2025 20:08
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f982f5 and 243ccb3.

📒 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)

Comment on lines +41 to +43
projects:
- url: https://github.com/users/thenarfer/projects/1
workflow: .github/workflows/add-to-project.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 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/1

Also 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_TEMPLATE

Length 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"
fi

Length 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/1

Ensure 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.

Comment on lines +27 to +29
projects:
- url: https://github.com/users/thenarfer/projects/1
workflow: .github/workflows/add-to-project.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ 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.yml

Length 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 || true

Length 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 || true

Length 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.

Suggested change
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.

Comment on lines +22 to +24
projects:
- url: https://github.com/users/thenarfer/projects/1
workflow: .github/workflows/add-to-project.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 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_TEMPLATE

Length 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.

Suggested change
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.

Comment on lines +25 to +27
projects:
- url: https://github.com/users/thenarfer/projects/1
workflow: .github/workflows/add-to-project.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 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.

Suggested change
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(workflows): auto-add selected issue templates to project chore(ci): fix invalid actions/add-to-project reference

1 participant