Add: Add GitHub script to give teams access to a list of repos #555
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.
What
Add GitHub script to give teams access to a list of repos
See
poetry run pontos-github-script scripts/github/team-repositories.py --help
for usage of the script.To assign a list of repositories the
search-repositories.py
andteam-repositories.py
scripts can be combined. For example to add devops with read permissions to all gos repospontos-github-script scripts/github/search-repositories.py --organization greenbone --in-name --columns name --format csv gos | pontos-github-script scripts/github/team-repositories.py --teams devops --repositories-file - --permission pull
The
search-repositories.py
prints all found repository names to stdout by displaying only the name column--columns name
and the output format CSV--format csv
. The found repository names are piped to stdin ofteam-repositories.py
which reads this names from stdin via--repositories-file -
.Why
Automation of changing permissions on our repos.
References
GHS-46
Checks