Github action to automatically sync labels in the given repo based on a rule set.
name: Sync Labels
on:
schedule:
# run at 02:00 every day
- cron: "0 2 * * *"
jobs:
lint-commits:
steps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test the action locally
uses: matmar10/sync-labels
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository: your-org/your-repository
See the github-label-sync options
By default, it uses @commitlint/config-conventional rules.
Add a JSON file under .github/prcolinterrc.json
to define your customer rules:
- name: "type: bug"
color: "e11d21"
aliases:
- bug
- fix
description: Something is not working as expected
- name: "type: feature"
color: "1d7a4a"
aliases:
- enhancement
- feature
You can see verbose log output by adding a Github secret on ACTIONS_STEP_DEBUG
to true