https://github.com/devwithkrishna/github-create-and-add-labels-all-repos-using-python
Create and add GitHub labels to repositories which can be later used for pull requests and issuead
https://github.com/devwithkrishna/github-create-and-add-labels-all-repos-using-python
dependabot github github-action github-workflow poetry python
Last synced: 10 months ago
JSON representation
Create and add GitHub labels to repositories which can be later used for pull requests and issuead
- Host: GitHub
- URL: https://github.com/devwithkrishna/github-create-and-add-labels-all-repos-using-python
- Owner: devwithkrishna
- License: mit
- Created: 2024-05-18T18:28:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-25T20:35:55.000Z (about 1 year ago)
- Last Synced: 2025-01-16T00:55:52.020Z (11 months ago)
- Topics: dependabot, github, github-action, github-workflow, poetry, python
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-create-and-add-labels-all-repos-using-python
Create and add GitHub labels to repositories which can be later used for pull requests and issues
# How code works
* we use _**GitHub REST API**_ to programatically create Labels
* The program `create_new_labels.py` have 2 parts
1. It uses GitHub endpoint for listing repos under an organization to list all repositories
2. It uses create labels end point to create labels in repos
* Proper logs (*error* OR *success messgaes*) are displayed
# Authentication method used
`I am using fine grained personal access token`
* The fine-grained token must have at least one of the following permission sets:
* "Issues" repository permissions (write)
* "Pull requests" repository permissions (write)
# Reference
[Create Github Labels](https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28#create-a-label)