Skip to content

Add daily triage workflow for GitHub Project 1597#139594

Merged
lakper merged 2 commits intomasterfrom
copilot/monitor-github-project-1597
Apr 15, 2026
Merged

Add daily triage workflow for GitHub Project 1597#139594
lakper merged 2 commits intomasterfrom
copilot/monitor-github-project-1597

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

Adds a scheduled GitHub Actions workflow that monitors Project 1597 daily, flags issues needing attention, and posts a summary report.

Workflow (.github/workflows/daily-project-triage.yml)

  • Trigger: cron: '0 9 * * *' + workflow_dispatch with optional project_number and stale_days inputs
  • Token: VA_VSP_BOT_GITHUB_TOKEN || GITHUB_TOKEN — bot token provides read:org/project scope for Projects v2 GraphQL; falls back to REST listForRepo if unavailable
  • Label bootstrap: ensures needs-attention label exists before labeling; creates it if missing, re-throws on non-404 errors

Triage criteria (skips issues already carrying needs-attention)

Criterion Logic
Unassigned assignees.totalCount === 0
Stale updatedAt < now - STALE_DAYS * MS_PER_DAY
Attention label issue has needs-review, blocked, or bug
Overdue project Due date field < now

Output

  • Adds needs-attention label to each flagged issue (once — idempotent)
  • Creates a summary issue only when there are flagged issues:
🚨 Daily Project Triage Report - 2026-04-15

Includes breakdown table by reason, per-category issue lists with links and staleness age, and a timestamp.

Original prompt

Create a GitHub Actions workflow that monitors GitHub Project 1597 daily and flags tickets that need attention.

Workflow Requirements

Trigger: Daily at 9:00 AM UTC

Criteria for "Needs Attention":

  • Issues without assignees
  • Stale issues (no updates in 2+ days)
  • Issues with specific labels: needs-review, blocked, or bug
  • Issues past due date

Actions:

  • Add needs-attention label to flagged issues
  • Create a daily summary issue with:
    • Count of flagged issues
    • List of flagged issues with links, current status, and reason flagged
    • Timestamp of when the check ran
  • Only create summary issue if there are flagged issues to report

Technical Details:

  • Use GitHub Actions with actions/github-script@v7 or similar
  • Query issues from the department-of-veterans-affairs/va.gov-team repository
  • Handle edge cases (e.g., don't flag already-labeled issues twice)
  • Use clear, readable summary format in the daily issue

Summary Issue Format:

  • Title: "🚨 Daily Project Triage Report - [Date]"
  • Body should include:
    • Total flagged issues count
    • Breakdown by reason (unassigned, stale, labeled, overdue)
    • Table or list with issue links and details
    • Timestamp

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: I want to write a workflow that will look at my github project daily and flag any tickets that need attetion

Assistant: I'll help you create a workflow to monitor your GitHub project and flag tickets that need attention. Let me start by loading the relevant ability for this task.

Assistant: I can help you create a GitHub Actions workflow for this! This isn't a debugging task, so let me set that ability aside and focus on your workflow needs.

To create an effective workflow that reviews your project daily and flags tickets needing attention, I need to understand a few things:

  1. Which project? Do you have a specific GitHub Project (Classic or the newer Projects v2) you want to monitor, or should we look at issues in a particular repository?

  2. What criteria indicate "needs attention"?

    • Issues without assignees?
    • Stale issues (no updates in X days)?
    • Issues with specific labels (e.g., needs-review, blocked, bug)?
    • Issues past a due date?
    • A combination of these?
  3. How should tickets be flagged?

    • Add a label or comment?
    • Create a summary issue?
    • Send a notification (Slack, email, etc.)?
    • Update the project board?
  4. Which repository should this workflow live in?

Once you clarify these details, I can create a workflow that:

  • Runs on a schedule (daily at a specific time)
  • Queries your project or repository for matching issues
  • Takes action based on your criteria
  • Provides clear reporting so you stay on top of things

What would work best for your use case?

User: project https://github.com/orgs/department-of-veterans-affairs/projects/1597/

Assistant: I see that I can't directly query the project via API. Let me take a different approach. To create a workflow that checks your project daily, I need a bit more information:

  1. What's the main repository associated with this project? (The workflow file will need to live somewhere)

  2. What criteria should trigger the "needs attention" flag? For example:

    • Issues in specific columns/states (e.g., "In Progress" but not updated in 7 days)?
    • Issues without assignees?
    • Issues with certain labels?
    • Issues that are overdue?
    • Pull requests awaiting review?
  3. What action should the workflow take?

    • Add a comment or label to flagged issues?
    • Create a summary issue or discussion?
    • Post to Slack/Teams?
    • Update issue status in the project?
  4. How often and when should it run? (e.g., daily at 9 AM, weekdays only?)

Once I have these details, I'll create a workflow that automatically monitors your project and keeps your team accountable!

User: What criteria indicate "needs attention"?

Issues without assignees?
Stale issues (no updates in 2 days)?
Issues with specific labels (e.g., needs-review, blocked, bug)?
Issues past a due date?
A combination of these?
How should tickets be flagged?

Add a label or comment?
Create a summary issue?
Send a notification (Slack, email, etc.)?
Update the project board?

Assistant: Perfect! Now I understand the repository. Before I create the workflow, I need you to specify your preferences for these two key questions:

1. What criteria indicate "needs attention"? (Select one or more)

  • Issues without assignees
  • Stale issues (no updates in 2 days)
  • Issues with specific labels (e.g., needs-review, blocked, bug)
  • Issues past a due date
  • Custom criteria (describe)

2. How should tickets be flagged? (Select one or more)

  • Add a label (e.g., needs-attention, flagged)
  • Add a comment with a summary
  • Create a summary issue with a daily report
  • Send a notification (Slack...

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Add GitHub Actions workflow to monitor Project 1597 Add daily triage workflow for GitHub Project 1597 Apr 15, 2026
Copilot AI requested a review from lakper April 15, 2026 22:07
@lakper lakper marked this pull request as ready for review April 15, 2026 23:42
@lakper lakper requested a review from a team as a code owner April 15, 2026 23:42
@lakper lakper requested review from little-oddball and removed request for a team April 15, 2026 23:42
@lakper lakper merged commit 5f32c5d into master Apr 15, 2026
7 checks passed
@lakper lakper deleted the copilot/monitor-github-project-1597 branch April 15, 2026 23: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.

2 participants