Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lannonbr/issue-label-manager-action
GitHub Action to declaratively setup labels across repos
https://github.com/lannonbr/issue-label-manager-action
github-actions
Last synced: about 16 hours ago
JSON representation
GitHub Action to declaratively setup labels across repos
- Host: GitHub
- URL: https://github.com/lannonbr/issue-label-manager-action
- Owner: lannonbr
- License: mit
- Created: 2018-12-05T20:29:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-25T15:33:05.000Z (about 2 years ago)
- Last Synced: 2024-10-25T09:46:24.309Z (3 months ago)
- Topics: github-actions
- Language: JavaScript
- Homepage:
- Size: 468 KB
- Stars: 191
- Watchers: 7
- Forks: 21
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-actions - Declaratively setup GitHub Labels
- fucking-awesome-actions - Declaratively setup GitHub Labels
- awesome-workflows - Declaratively setup GitHub Labels
- jimsghstars - lannonbr/issue-label-manager-action - GitHub Action to declaratively setup labels across repos (JavaScript)
README
# Issue Label Manager Action
This GitHub Action allows you to declaratively state the labels to be defined in a repo.
In the repo you'd like to use this, define a JSON file in `.github/labels.json`. This file will contain an array of objects that have a name, color, and description as shown in the example below.
![labels.json file](screenshots/json.png)
Then, set up a workflow that executes this action. When run, it will update the list of labels in the repo to match the JSON file. If you wish for this to remove any labels not in the JSON file, set the `delete` input to true as shown in the example below.
The result of using the labels.json file shown above is as follows:
![Labels result](screenshots/labels.png)
If a label doesn't need a description, leave out the `description` field of the entry in the json file and when deployed the label will not contain a description.
## Usage
This action only needs the GITHUB_TOKEN secret as it interacts with the GitHub API to modify labels. The action can be used as such:
```yaml
on: issues
name: Create Default Labels
jobs:
labels:
name: DefaultLabelsActions
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: lannonbr/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
delete: true # will delete any labels that aren't in the .github/labels.json (this is set to false by default)
```