fix: apply dependabot config via PR (branch protection blocks direct push)#23
Merged
fix: apply dependabot config via PR (branch protection blocks direct push)#23
Conversation
…push) ## Root cause After PR #19 added `required_pull_request_reviews` to the default branch, direct pushes to `main` from the bot are blocked. The deployed scheduler (now actually running, post-#21) immediately revealed this: every `generate-dependabot` task across the org failed with: > Could not create file: Changes must be made through a pull request ## Fix Set `change_strategy.use_pull_requests: true` in `config.yml`. The code path already exists in `src/dependabot.js:25-30` and `src/github-api.js:42-83` — it was just never enabled in config. Schema validation added for the new section. ## Cleanup needed after deploy Three rows in the deployed task store are stuck at `status=failed, attempts=3`. Their dedup keys block re-enqueue. Run on netcup to clear: ``` node -e 'import("./src/task-store.js").then(m => { const s = m.initTaskStore("./data/tasks.db"); s._db.prepare("DELETE FROM tasks WHERE status = ?").run("failed"); s.close(); })' ``` A `/retry-failed-tasks` ChatOps command is a sensible follow-up. ## Test plan - [x] All 698 tests pass - [x] eslint clean - [ ] After merge + deploy + manual cleanup: next time a non-bot PR opens in any org repo, the bot enqueues `generate-dependabot`, the scheduler claims it on the next tick, and the bot opens a `[temper] Configuration update` PR adding `.github/dependabot.yml`. ## Risk & rollout - Risk: low. Pure config flip. PR-creation path is well-tested (`__tests__/integration/github-api.test.js`). - Rollout: self-update on merge, then manual one-shot to clear the 3 permanently-failed rows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
AI Code Review for PR #23pulseengine/temper: Summary of ChangesThe PR introduces a fix to apply Dependabot configuration via pull request rather than direct push. This change is necessary due to the introduction of branch protection in PR #19, which blocks direct commits to the default branches. Potential Bugs or Issues
Security Concerns
Suggestions for Improvement
Overall AssessmentThe PR addresses a critical issue related to branch protection by ensuring that Dependabot configurations are applied via pull requests. However, there is room for improvement in terms of security measures and configuration validation. The implementation is mostly correct but could benefit from additional robustness. This review was generated by a local AI model. It is advisory only and may contain inaccuracies. Reviewed at |
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.
Root cause
After PR #19 added
required_pull_request_reviewsto the default branch, direct pushes from the bot are blocked. The scheduler — now actually running post-#21 — immediately revealed this: everygenerate-dependabottask across the org failed with:Three rows in the deployed task store (
pulseengine/temper,pulseengine/rivet,pulseengine/spar) are stuck atstatus=failed, attempts=3.Fix
Set
change_strategy.use_pull_requests: trueinconfig.yml. The code path already exists insrc/dependabot.js:25-30andsrc/github-api.js:42-83— it just wasn't enabled in config. Schema validation added.Manual cleanup after deploy
The 3 stuck rows have unique dedup keys, so new attempts won't re-enqueue. One-shot on netcup:
```bash
node -e 'import("./src/task-store.js").then(m => {
const s = m.initTaskStore("./data/tasks.db");
s._db.prepare("DELETE FROM tasks WHERE status = ?").run("failed");
s.close();
})'
```
A
/retry-failed-tasksChatOps command is a sensible follow-up but out of scope here.Test plan
generate-dependabot→ scheduler claims it → bot opens a `[temper] Configuration update` PR adding `.github/dependabot.yml`octokit.issuesbug, deployed at `a9b8e6f`). If a review comment lands within ~5 min, both fixes are confirmed working.Risk & rollout
🤖 Generated with Claude Code