Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ This is how it would end up looking:
]
```

Note that `color` may be specified in either `000000` or `'#000000'` format. Mind the quotes when using yaml.

If you want to see an actual config file, you can check out the one in this repo [here](.github/labels.yml).

This action can either read a local file or fetch it from a custom URL.
Expand Down
4 changes: 2 additions & 2 deletions lib/index.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ let configSource!: 'list' | 'repo'
break
}

// Support prefixing colors with '#'.
labels = labels.map((label) => ({
...label,
color: label.color.replace(/^#/, '')
}))

startGroup('Syncing labels...')
const options: Options = {
accessToken: getInput('token'),
Expand Down