chore: Turn off commit with `gpgsign` in script/generate.sh by alexandear · Pull Request #3982 · google/go-github
This PR resolves the following problem. I'm using gpgsign for signing my commits. When I run ./script/lint.sh and get the error:
❯ ./script/lint.sh linting . 0 issues. linting example ... linting tools/structfield /Users/alexandear/src/github.com/google/go-github/tools/structfield 0 issues. validating generated files error: gpg failed to sign the data: gpg: skipped "bot <bot@localhost>": No secret key [GNUPG:] INV_SGNR 9 bot <bot@localhost> [GNUPG:] FAILURE sign 17 gpg: signing failed: No secret key fatal: failed to write commit object failed validating generated files
This happens when ./script/lint.sh calls ./script/generate.sh with the --check argument. Therefore, I decided to explicitly disable commit.gpgsign to resolve the issue for all users of gpgsign.
P.S. I think ./script/generate.sh is overcomplicated and can be simplified. But this is another story and can be discussed in issue #3983.