nix-hashes workflow cannot push to protected branch #8172

Closed
opened 2026-02-16 18:09:20 -05:00 by yindo · 1 comment
Owner

Originally created by @jerome-benoit on GitHub (Jan 31, 2026).

Originally assigned to: @thdxr on GitHub.

Problem

The nix-hashes.yml workflow fails when trying to push updated hashes to dev:

remote: error: GH013: Repository rule violations found for refs/heads/dev.
remote: - Changes must be made through a pull request.
To https://github.com/anomalyco/opencode
 ! [remote rejected]     HEAD -> dev (push declined due to repository rule violations)

The dev branch is protected and requires changes via pull request, but the workflow attempts a direct push with GITHUB_TOKEN.

Solutions

  1. Grant bypass permission to the GitHub App token used by the workflow
  2. Create a PR instead of pushing directly - the workflow would open a PR with the hash updates for a maintainer to merge
Originally created by @jerome-benoit on GitHub (Jan 31, 2026). Originally assigned to: @thdxr on GitHub. ## Problem The `nix-hashes.yml` workflow fails when trying to push updated hashes to `dev`: ``` remote: error: GH013: Repository rule violations found for refs/heads/dev. remote: - Changes must be made through a pull request. To https://github.com/anomalyco/opencode ! [remote rejected] HEAD -> dev (push declined due to repository rule violations) ``` The `dev` branch is protected and requires changes via pull request, but the workflow attempts a direct push with `GITHUB_TOKEN`. ## Solutions 1. **Grant bypass permission** to the GitHub App token used by the workflow 2. **Create a PR instead of pushing directly** - the workflow would open a PR with the hash updates for a maintainer to merge
yindo added the nix label 2026-02-16 18:09:20 -05:00
yindo closed this issue 2026-02-16 18:09:20 -05:00
Author
Owner

@jerome-benoit commented on GitHub (Feb 1, 2026):

Fixed

@jerome-benoit commented on GitHub (Feb 1, 2026): Fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8172