fix: require complete weekly traffic data - #233
Merged
Merged
Conversation
Wait for all seven consecutive traffic dates before updating CSV files or opening a pull request. This prevents delayed GitHub traffic reporting from producing partial-week updates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: faeed566-c636-49b1-a92d-44d43d7912f0
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The date calculation can stall across calendar-year boundaries.
Review effort: Balanced
Findings: 1
What changed in this PR
Updates the traffic workflow to prevent partial-week PRs.
Changes:
- Requires seven consecutive, complete dates.
- No-ops when data is incomplete.
- Verifies both CSV files receive matching windows.
| File | Description |
|---|---|
.github/workflows/traffic-updater.md |
Defines complete weekly-window validation and retry behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ## Step 3 — Determine the next complete seven-day window | ||
|
|
||
| From the API response, keep only entries whose date is **after** the last recorded date from Step 1. | ||
| The next collection window starts on the calendar day immediately after the last recorded date and ends six days later. |
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.

Summary
This prevents partial-week updates like #232. That PR should be closed without merging and retried after the API reports the complete September 21–27 window.
Validation
gh aw compile traffic-updater --no-emit --validate --no-check-update