ci: Add workflow to automate API reference sync on new version tags#822
Merged
ci: Add workflow to automate API reference sync on new version tags#822
Conversation
qmonnet
commented
Apr 9, 2025
Frostman
reviewed
Apr 15, 2025
dee8923 to
0bd5f94
Compare
Member
|
I've added the application and installed it only for the docs repo. I've added secrets for the fabric, fabricator, and gateway repos, as all of them will need docs to be synced. |
ff24430 to
11979ca
Compare
The API reference generated in this repository is published via the "docs" repository for the project. This means that we regularly need to synchronize the document. Instead of manually copying the API reference and creating a new Pull Request in the "docs" repo, let's add a workflow to automate this task. The workflow runs each time a new version tag is created in the "fabric" repository. Signed-off-by: Quentin Monnet <qmo@qmon.net>
Let's use the create-github-app-token Action to generate a GitHub App token for the 'docs' repository, so that we can create a Pull Request there, to sync up the API reference. Comparing to a personal access token, this solution has the advantage of making the GitHub App, rather than the contributor owning the token, the author of the generated Pull Request. Link: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens Link: https://github.com/actions/create-github-app-token#usage Signed-off-by: Quentin Monnet <qmo@qmon.net>
11979ca to
c0eff2d
Compare
- created and installed app, added secrets with id and key - adding note on when to merge a pr Signed-off-by: Sergei Lukianov <me@slukjanov.name>
c0eff2d to
8683dff
Compare
Frostman
approved these changes
Apr 15, 2025
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.
Automation
The API reference generated in this repository is published via the
docsrepository for the project. This means that we regularly need to synchronize the document.Instead of manually copying the API reference and creating a new Pull Request in the
docsrepo, let's add a workflow to automate this task. The workflow runs each time a new version tag is created in thefabricrepository.Test
The workflow was tested successfully between my own forks of the
fabricanddocsrepositories, leading to the automated creation of qmonnet/hhdocs#1 when I pushed a tag to my fork.Authentication
For my test I used a fine-grained PAT (using the scope from the docs), passed as a repository secret. For the upstream
fabricrepo we probably need something different, something that makes thegithub-actionsbot the author of the PR, maybe a GitHub App token? I'm not familiar with using those, though.