Skip to content

fix(workflow): refresh-traffic creates PR instead of direct push - #55

Merged
memoryfraction merged 1 commit into
mainfrom
fix/refresh-traffic-pr
Sep 3, 2026
Merged

memoryfraction merged 1 commit into
mainfrom
fix/refresh-traffic-pr

Conversation

@memoryfraction

Copy link
Copy Markdown
Owner

Root Cause

The
efresh-traffic\ workflow was failing on every run (5/5 consecutive failures) because it tried to \git push\ directly to \main, but main has branch protection and \github-actions[bot]\ is not a bypass actor.

Fix

Changed the final step from direct push to main:

  1. Create a timestamped branch (\chore/traffic-YYYYMMDD-HHMMSS)
  2. Push the branch
  3. Open a PR via \gh pr create\
  4. Close any stale open PR from a previous run (to avoid stacking)

Also added \pull-requests: write\ to the job permissions.

After merging

Manually trigger the workflow once (Actions → refresh-traffic → Run workflow) to backfill the missing data snapshots.

Root cause: main branch is protected, so direct git push from
github-actions[bot] is rejected. The workflow has been failing
on every run since it was created.

Fix: switch the Commit-and-push step to create a timestamped
branch, push it, and open a PR via gh CLI. Close any stale
open PR from a previous run to avoid stacking.
@memoryfraction
memoryfraction merged commit eead5b3 into main Sep 3, 2026
3 checks passed
@memoryfraction
memoryfraction deleted the fix/refresh-traffic-pr branch September 6, 2026 13:18
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.

1 participant