Skip to content

Fix workflow YAML broken by an applied Copilot Autofix suggestion - #20

Merged
fdevans merged 1 commit into
mainfrom
fix-broken-workflow-yaml
Aug 31, 2026
Merged

Fix workflow YAML broken by an applied Copilot Autofix suggestion#20
fdevans merged 1 commit into
mainfrom
fix-broken-workflow-yaml

Conversation

@fdevans

@fdevans fdevans commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What's broken right now

main's pr-tracking-workflow.yml doesn't parse. 833450a ("Potential
fix for pull request finding", a GitHub Copilot Autofix suggestion applied
directly to main outside of review) landed two lines at column 0 inside
a run: | block. That breaks YAML for the whole file - which is why
workflow_dispatch disappeared from the Actions UI (manual runs no
longer possible) and gh workflow list shows the raw filename instead of
the workflow's name: (the tell that GitHub can't parse it at all).

That same commit also dropped git add pr-tracking/ from the final
step. Even once the YAML is fixed, the commit step would have had
nothing staged - the workflow would have kept "succeeding" while
silently never committing anything again, not just latest.md but the
whole daily report and every history CSV.

What this does

Fixes the indentation and restores git add. Also properly implements
the underlying idea the autofix was reaching for (avoiding a second,
possibly UTC-midnight-inconsistent date +%Y-%m-%d call in a later
step) instead of reverting it: the first step now shares its $today
via $GITHUB_ENV, and the later two steps read that instead of either
recomputing date or globbing for the newest file by mtime (which the
autofix did, and which has its own edge cases).

Verified

  • python3 -c "import yaml; yaml.safe_load(...)" - parses cleanly now.
  • bash -n on each of the three affected steps' extracted script bodies.

The 'Potential fix for pull request finding' commit (833450a) that got
applied directly to main broke two things:

1. Two lines landed at column 0 inside a `run: |` block, breaking YAML
   indentation. GitHub couldn't parse the file at all as a result -
   which is why workflow_dispatch stopped showing up for manual runs
   (gh workflow list fell back to showing the raw filename instead of
   the workflow's name:, the tell that parsing had failed).
2. It dropped `git add pr-tracking/` entirely. Even with the YAML
   fixed, the commit step would have nothing staged - the workflow
   would silently stop committing anything, ever, including all the
   history files, not just latest.md.

The underlying concern the autofix was reaching for - avoiding a second,
possibly UTC-midnight-inconsistent `date +%Y-%m-%d` call across steps -
was legitimate. Implemented it properly instead: the first step computes
$today once and shares it via $GITHUB_ENV; later steps read it rather
than recomputing (or globbing for it by file mtime, which has its own
edge cases).
@fdevans
fdevans requested review from a team and a lite review from Copilot August 31, 2026 16:21
@fdevans
fdevans merged commit cf87dd6 into main Aug 31, 2026
1 check passed

Copilot AI left a comment

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.

Pull request overview

Fixes the org-wide PR tracking GitHub Actions workflow so it parses correctly again and resumes committing daily artifacts to the pr-tracking branch. It also makes the “today” date value consistent across steps by exporting it once via $GITHUB_ENV, avoiding step-to-step date drift and removing reliance on filesystem mtime heuristics.

Changes:

  • Persist the computed today value to $GITHUB_ENV so later steps reuse the same date.
  • Update later steps to rely on $today rather than recomputing date or globbing the newest report by mtime.
  • Restore staging of pr-tracking/ before committing so generated reports/history are actually committed.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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