Skip to content

fix: only set web_commit_signoff_required if explicitly configured#3165

Open
steveteuber wants to merge 6 commits intointegrations:mainfrom
steveteuber:explicit_web_commit_signoff_required
Open

fix: only set web_commit_signoff_required if explicitly configured#3165
steveteuber wants to merge 6 commits intointegrations:mainfrom
steveteuber:explicit_web_commit_signoff_required

Conversation

@steveteuber
Copy link
Contributor

Resolves #2077


Before the change?

The GitHub API 2022-11-28 version has a bug that causes a 422 error when updating a repository within an organization that has "Require sign off on web-based commits" enabled. This is because the API does not allow the web_commit_signoff_required field to be sent in the update request when the organization has this setting enabled.

After the change?

The user has to explicitly set the web_commit_signoff_required field in the repository configuration to enable or disable it. If the field is not set in the configuration, it will not be sent in the update request, which avoids the 422 error when an organization has "Require sign off on web-based commits" enabled.

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@steveteuber steveteuber force-pushed the explicit_web_commit_signoff_required branch from 98629a4 to 6944501 Compare February 12, 2026 11:49
@deiga deiga added this to the v6.12.0 Release milestone Feb 12, 2026
@deiga
Copy link
Collaborator

deiga commented Feb 14, 2026

Please rebase 😬

Copy link
Collaborator

@stevehipwell stevehipwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steveteuber please take a look at the code for allow_forking & vulnerability_alerts which do what you're looking to achieve here.


// only configure web commit signoff if explicitly set in the configuration
if webCommitSignoffRequired, ok := d.GetOkExists("web_commit_signoff_required"); ok { //nolint:staticcheck,SA1019 // We sometimes need to use GetOkExists for booleans
if val, ok := webCommitSignoffRequired.(bool); ok {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code isn't doing what you think it is, ok is always going to be true.

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.

[BUG]: 5.43 upgrade failing due to signoff issues

3 participants