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

Create repository configuring Workflows with 'Read and write' #150

Open
oscard0m opened this issue Jun 17, 2024 · 1 comment
Open

Create repository configuring Workflows with 'Read and write' #150

oscard0m opened this issue Jun 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working as documented, or is being fixed

Comments

@oscard0m
Copy link
Member

oscard0m commented Jun 17, 2024

The problem

Octoherd repositories are scaffolded with a release GitHub workflow (.github/workflows/release.yml), which uses semantic-release to manage the releases to NPM. This workflow requires the repository to be configured to grant workflows with 'Read and Write' permissions.

But by default, a repository is created with the configuration 'Read repository contents and packages permissions'. This makes new Octoherd scripts scaffolded not work out of the box when trying to do their first release.


Proposed solution

To update the repository creation logic and set this required configuration out of the box. GitHub offers a way to update this via API: https://docs.github.com/en/rest/actions/permissions?apiVersion=2022-11-28#set-default-workflow-permissions-for-a-repository

Questions

What would be the first choice if there is an existing parent configuration at org/user level?
a) To respect that parent configuration
b) To still apply the Read and Write for that octoherd repository, ignoring what's configured at org/user level.

@oscard0m oscard0m added the bug Something isn't working as documented, or is being fixed label Jun 17, 2024
@oscard0m oscard0m self-assigned this Jun 17, 2024
@gr2m
Copy link
Member

gr2m commented Jun 19, 2024

I didn't know about that API, very cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as documented, or is being fixed
Projects
None yet
Development

No branches or pull requests

2 participants