Skip to content

feat(add-workflow): update-closed-issues#534

Merged
tripura-repalle merged 2 commits into
mainfrom
feat/update-closed-issues
Mar 2, 2026
Merged

feat(add-workflow): update-closed-issues#534
tripura-repalle merged 2 commits into
mainfrom
feat/update-closed-issues

Conversation

@tripura-repalle

@tripura-repalle tripura-repalle commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Adds two GitHub Actions that run when an issue is closed. One confirms the trigger, and the other sets the “Closed Date” on our Project (v2) item.

  • New Features

    • Test workflow logs the closed issue number and title to confirm the trigger.
    • Set Project Closed Date updates “Closed Date” in org project 11 using issue.closed_at (fallback to today), formatted as UTC YYYY-MM-DD.
  • Migration

    • Add secret ORG_PROJECT_PAT with write access to GitHub Projects.

Written for commit a14175a. Summary will update on new commits.

Summary by CodeRabbit

  • Chores
    • Added automated workflows that trigger when issues are closed
    • Automatically captures issue closure events and updates project management records with closure dates

Signed-off-by: Tripura Repalle <tripura@blinklabs.io>
@tripura-repalle
tripura-repalle requested a review from a team as a code owner March 2, 2026 17:29
@coderabbitai

coderabbitai Bot commented Mar 2, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Two GitHub Actions workflows are added to automate actions on issue closure. The first workflow, "Test Issue Close Trigger," outputs the closed issue number and title to confirm trigger functionality. The second workflow, "Set Project Closed Date," computes a closed date from the issue's closed_at timestamp or uses the current UTC date, formats it as YYYY-MM-DD, and updates a project board field named "Closed Date" with this value. Both workflows are triggered by closed issue events.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding GitHub Actions workflows to update closed issues. It directly reflects the core objective of the PR.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/update-closed-issues

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 2 files

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/workflows/update-issue-on-close.yml (1)

7-9: Permissions may be insufficient for project board updates.

The workflow has contents: read and issues: read permissions, but updating a GitHub Projects v2 board typically requires repository-projects: write permission. Since you're using a PAT (ORG_PROJECT_PAT) which likely has broader permissions, this may work, but if you ever switch to GITHUB_TOKEN, ensure the permissions are sufficient.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/update-issue-on-close.yml around lines 7 - 9, The workflow
currently sets permissions: contents: read and issues: read which are
insufficient for updating a GitHub Projects v2 board; update the permissions
block to include repository-projects: write (or at least repository-projects:
write when using GITHUB_TOKEN) and ensure the secret ORG_PROJECT_PAT is scoped
appropriately—modify the permissions keys (contents, issues,
repository-projects) in the YAML so repository-projects has write access and
validate behavior with both ORG_PROJECT_PAT and GITHUB_TOKEN.
.github/workflows/test-issue-on-close.yml (1)

1-19: Consider removing this test workflow before merging.

This workflow appears to be a debugging/test workflow to verify issue close triggers work correctly. If this was created solely for testing purposes, consider removing it before merging to avoid unnecessary workflow runs on every issue closure.

If intentionally kept for observability, the implementation is sound—using environment variables to pass context values safely avoids shell injection risks.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/test-issue-on-close.yml around lines 1 - 19, This workflow
("Test Issue Close Trigger") is a test/debug workflow that triggers on issue
closures (on: issues: types: [closed]); if it was only created for testing,
delete this workflow file to avoid running on every issue close, otherwise
restrict or disable it (for example, replace the issue trigger with a manual
trigger like workflow_dispatch or add conditional filters to limit which issues
trigger it) and keep the env/echo steps as-is if you intend to retain
observability.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/update-issue-on-close.yml:
- Around line 22-30: The script is directly interpolating
github.event.issue.closed_at into the shell (ts='${{
github.event.issue.closed_at }}'); change this to pass the value via an
environment variable instead and read that env var in the shell to avoid direct
interpolation. Update the workflow step to set an env entry (e.g., CLOSED_AT:
${{ github.event.issue.closed_at }}) and then in the script use ts="$CLOSED_AT"
(or similar) when computing d and writing GITHUB_OUTPUT, keeping the existing
logic around null/empty and date formatting intact.

---

Nitpick comments:
In @.github/workflows/test-issue-on-close.yml:
- Around line 1-19: This workflow ("Test Issue Close Trigger") is a test/debug
workflow that triggers on issue closures (on: issues: types: [closed]); if it
was only created for testing, delete this workflow file to avoid running on
every issue close, otherwise restrict or disable it (for example, replace the
issue trigger with a manual trigger like workflow_dispatch or add conditional
filters to limit which issues trigger it) and keep the env/echo steps as-is if
you intend to retain observability.

In @.github/workflows/update-issue-on-close.yml:
- Around line 7-9: The workflow currently sets permissions: contents: read and
issues: read which are insufficient for updating a GitHub Projects v2 board;
update the permissions block to include repository-projects: write (or at least
repository-projects: write when using GITHUB_TOKEN) and ensure the secret
ORG_PROJECT_PAT is scoped appropriately—modify the permissions keys (contents,
issues, repository-projects) in the YAML so repository-projects has write access
and validate behavior with both ORG_PROJECT_PAT and GITHUB_TOKEN.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d8f530c and c9182bf.

📒 Files selected for processing (2)
  • .github/workflows/test-issue-on-close.yml
  • .github/workflows/update-issue-on-close.yml

Comment thread .github/workflows/update-issue-on-close.yml
Signed-off-by: Tripura Repalle <tripura@blinklabs.io>
@tripura-repalle
tripura-repalle merged commit 5407d29 into main Mar 2, 2026
11 checks passed
@tripura-repalle
tripura-repalle deleted the feat/update-closed-issues branch March 2, 2026 19:20
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.

2 participants