https://github.com/financial-times/origami-labels
GitHub action to sync a repo's issue labels with the standard Origami set
https://github.com/financial-times/origami-labels
Last synced: 11 months ago
JSON representation
GitHub action to sync a repo's issue labels with the standard Origami set
- Host: GitHub
- URL: https://github.com/financial-times/origami-labels
- Owner: Financial-Times
- Created: 2020-03-13T15:03:17.000Z (about 6 years ago)
- Default Branch: v1
- Last Pushed: 2024-07-02T14:41:59.000Z (almost 2 years ago)
- Last Synced: 2024-11-22T03:56:00.220Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 2.26 MB
- Stars: 4
- Watchers: 25
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Origami Labels
GitHub action to sync a repo's issue labels with the standard Origami set.
## Usage
To use this action, create the following file in your GitHub repo:
```
.github/workflows/sync-repo-labels.yml
```
```yml
on: [issues, pull_request]
jobs:
sync-labels:
runs-on: ubuntu-latest
name: Sync repository labels
steps:
- uses: Financial-Times/origami-labels@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
```
:warning: Whenever an issue is opened, the workflow will execute. This overrides all labels in the repository and may result in loss of data if it's run on a repo that isn't owned by Origami.
You can do this by running the following command from a repo:
```bash
mkdir -p .github/workflows && curl https://raw.githubusercontent.com/Financial-Times/origami-labels/v1/example.yml --output .github/workflows/sync-repo-labels.yml
```
## Labels
You can find the current labels in [`./labels.js`](labels.js). Edit this file to make changes to Origami's suite of labels.
### Current Labels
Label|Description|Color|Example
-----|-----|-----|-----
blocked|Work blocked by something else|`#CC0000` (crimson)|
breaking|Will require a major version bump|`#990F3D` (claret)|
bug|Something isn't working|`#CC0000` (crimson)|
accessibility|An accessibility issue|`#000000` (black)|
current|Used to mark an issue as planned for Origami's current six-week cycle|`#FFB885` (mandarin 60% on white)|
next|Used to mark an issue to discuss in Origami's next six-week planning session|`#FFCFAD` (mandarin 40% on white)|
dependencies|This is maintenance work relating to dependency bumps|`#FFEC1A` (lemon)|
discussion|General discussion including support questions|`#FF7FAA` (candy)|
documentation|Improvements or additions to documentation|`#CCE6FF` (sky)|
duplicate|This issue or pull request already exists|`#CCC1B7` (black-20)|
feature|New feature request|`#00994D` (jade)|
good starter issue|Good for newcomers|`#0D7680` (teal)|
help wanted|We'd appreciate some help with this|`#96CC28` (wasabi)|
maintenance|Technical tasks that might make things better|`#FFEC1A` (lemon)|
okr|This issue or pull request helps us meet an OKR|`#0f5499` (oxford)|
pattern|A new pattern which impacts multiple components|`#ac92b3` (velvet 50% on paper)|
proposal|A proposed change which requires approval or discussion|`#262a33` (slate)|
security|This includes a security patch|`#CC0000` (crimson)|
wontfix|This will not be worked on|`#CCC1B7` (black-20)|
#### Origami-Type Labels
Origami-type labels will be automatically added to issues based on the Origami manifest contained within the repo. These map to the types defined in the [Origami Manifest Spec](https://origami.ft.com/spec/v1/manifest/#origamitype).
Label|Description|Color|Example
-----|-----|-----|-----
[origamiType]|Relates to an Origami [origamiType]|`#593380` (velvet)|
#### Continuous Delivery Labels
These labels are used to automate releases.
Label|Description|Color|Example
-----|-----|-----|-----
release:major|Add to a PR to trigger a MAJOR version bump when merged|`#990F3D` (claret)|
release:minor|Add to a PR to trigger a MINOR version bump when merged|`#00994D` (jade)|
release:patch|Add to a PR to trigger a PATCH version bump when merged|`#CC0000` (crimson)|
### Changing a label name
When you want to change a label's name, it's very important to add the _old_ label name to the list of aliases for that label. This will ensure that the label is renamed rather than being removed then created. Failing to do this will result in loss of data.
1. Copy the value of the `name` property and add a new entry in that label's `aliases` array
2. Change the `name` property of the label to your new value
### Changing a label description
Change the `description` property for the label you wish to update.
### Changing a label colour
Add the new color value to the `colors` object. Change the `color` property for the label you wish to update.
## Development
Work should be based on the `master` branch, with changes PRed in.
If your changes are not breaking, merge them into the `v1` branch, and they'll be picked up by every repo running `v1` automatically.
If your changes ARE breaking, then you should create a `v2` branch based on master and update your chosen repo to use the new workflow.