Automatically update OpenAPI descriptions and generated code
IMPORTANT This requires that this repo's permissions allows GitHub Actions to create PRs. See instructions.
This adds a GitHub Actions Workflow to create a PR when go-github's generated files are out of date with https://github.com/github/rest-api-description.
It runs daily at 15:23 UTC -- an arbitrarily picked time.
Here is an example PR from my fork: https://github.com/WillAbides/go-github/pull/15
The change seems reasonable, and I don't have any strong opinions about it. I wasn't even aware we were using the OpenAPI spec for anything... interesting.
One thing I've done on other repos that automatically open pull requests is to authenticate with a GitHub App rather than a personal access token, so that it's not tied to any single user. You can see an example here that uses https://github.com/tibdex/github-app-token to get the token.
But that also requires additional work to create the app, get the credentials, etc. Which comes to the final point... I don't have admin access to this repo either. I can reach out to the Google OSPO contacts I do have and see if they've got anyone that can step in and help.