Fix workflow YAML broken by an applied Copilot Autofix suggestion - #20
Merged
Conversation
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).
Contributor
There was a problem hiding this comment.
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
todayvalue to$GITHUB_ENVso later steps reuse the same date. - Update later steps to rely on
$todayrather than recomputingdateor 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's broken right now
main'spr-tracking-workflow.ymldoesn't parse.833450a("Potentialfix for pull request finding", a GitHub Copilot Autofix suggestion applied
directly to
mainoutside of review) landed two lines at column 0 insidea
run: |block. That breaks YAML for the whole file - which is whyworkflow_dispatchdisappeared from the Actions UI (manual runs nolonger possible) and
gh workflow listshows the raw filename instead ofthe workflow's
name:(the tell that GitHub can't parse it at all).That same commit also dropped
git add pr-tracking/from the finalstep. 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.mdbut thewhole daily report and every history CSV.
What this does
Fixes the indentation and restores
git add. Also properly implementsthe underlying idea the autofix was reaching for (avoiding a second,
possibly UTC-midnight-inconsistent
date +%Y-%m-%dcall in a laterstep) instead of reverting it: the first step now shares its
$todayvia
$GITHUB_ENV, and the later two steps read that instead of eitherrecomputing
dateor globbing for the newest file by mtime (which theautofix did, and which has its own edge cases).
Verified
python3 -c "import yaml; yaml.safe_load(...)"- parses cleanly now.bash -non each of the three affected steps' extracted script bodies.