Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically update OpenAPI descriptions and generated code #2985

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

WillAbides
Copy link
Contributor

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: WillAbides#15

@gmlewis gmlewis changed the title Automatically update openapi descriptions and generated code Automatically update OpenAPI descriptions and generated code Nov 3, 2023
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @WillAbides !

I am no longer authorized to modify this repo's settings, but @willnorris may still be authorized. If not, he would know who is.

But at the very least, I would like @willnorris to approve this PR and make sure he is OK with it running nightly to ensure that all the metadata is up-to-date, so I am going to add him as a reviewer. He can loop in any other approvers needed from the Google OSPO team if needed.

@willnorris
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants