Repository navigation
Conversation
Merge the eight single-flag gh repo edit steps into one step, so GitHub validates the merge methods together instead of rejecting an intermediate state with none enabled (HTTP 422). Fail early when all three merge methods are false. Add the settings_homepage input (empty leaves the homepage unchanged) and the settings_issues input (default true, as on GitHub). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 and why
gh repo editsteps (description, delete branch on merge, discussions, rebase/squash/merge-commit, projects, wiki) into onegh repo editstep.gh repo editsends one PATCH, so GitHub validates the merge methods together. This should fix theRepository.merge_commit_allowed is invalid422 from HTTP 422: Validation Failed #43, which happened when a step left zero merge methods enabled partway through.settings_merge_commit,settings_merge_rebaseandsettings_merge_squashare all false.settings_homepage(set website url for a project #42): passed as--homepage. Empty (the default) leaves the homepage unchanged.settings_issues(Addsettings_issuesinput to enable/disable the Issues tab #44): passed as--enable-issues. The default istrue, notfalselikesettings_wiki/settings_projects. Until now the action never touched Issues. Afalsedefault would turn Issues off, and hide existing issues, in every repository that upgrades.docs/inputs.md, with a note on the merge-method check.Testing
action.ymlparses as YAML, andbash -npasses on the extracted script of the new step.ghthat prints its arguments. It built onegh repo editwith all flags, added--homepageonly when set, and exited 1 with the error when all merge methods were false.pytest(test.py) passes: 6 tests.gh repo editworks, not tested live.general/PR-validation checks on this fork end instartup_failurebecause the fork's Actions policy blocksschubergphilis/*actions. That happens on every PR here, not because of this change.Closes #66
Closes #43
Closes #42
Closes #44
🤖 Generated with Claude Code