Is there a way to set repo settings inside a file so that GitHub displays them on the main page?
Input (e.g. .github.yaml in main branch) |
Output (repo |
---|
I'm looking for an answer without calling GitHub APIs.
CodePudding user response:
I'm looking for an answer without calling GitHub APIs.
And yet, a call to updating a repository API would certainly be involved, through a GitHub Action.
You can setup such an action triggered only by your file, in the main
branch:
on:
push:
branches: ['main']
paths: ['.github.yaml']
And use directly a gh repo edit -d '...'
call, since the GitHub CLI I is preinstalled on all GitHub-hosted runners.
That way, each time you modify the .github.yaml
file, you can regenerate the About message on your repository.