boring-cyborg icon indicating copy to clipboard operation
boring-cyborg copied to clipboard

Allow more complex labels to be defined

Open reececomo opened this issue 4 years ago • 3 comments

Currently only basic label config is supported:

labelPRBasedOnFilePath:
  schema:
    - database/migrations/*

Supporting more advance options (specifically color and description) would add a lot of power to the tool (particularly if combined with https://github.com/kaxil/boring-cyborg/issues/15)

Example:

labelPRBasedOnFilePath:
  - label: schema
    files: ['database/migrations/*']

  - label: 'legacy/models :fire:'
    color: '#f04411'
    description: 'Warning: This PR touches the legacy data models.'
    files:
      - lib/models/*
      - lib/models/**/*

reececomo avatar Mar 16 '20 04:03 reececomo

(This would, in the future, allow us to add labels based on other triggers too)

e.g.

autolabel:
  - label: schema
    files: ['database/migrations/*']

  - label: 'Cool Project'
    files: ['app/CoolProject/**', 'app/CoolProject/*']
    titleRegex: '.*COOL\-.*'

reececomo avatar Mar 16 '20 08:03 reececomo

(This would, in the future, allow us to add labels based on other triggers too)

e.g.

autolabel:
  - label: schema
    files: ['database/migrations/*']

  - label: 'Cool Project'
    files: ['app/CoolProject/**', 'app/CoolProject/*']
    titleRegex: '.*COOL\-.*'

That is a nice idea, I like it.

kaxil avatar Mar 18 '20 10:03 kaxil