thehanimo / pr-title-checker

An action to automatically check if pull request titles conform to Contribution Guidelines
MIT License
106 stars 36 forks source link

Different checks based on branch #45

Open jakeleventhal opened 9 months ago

jakeleventhal commented 9 months ago

There should be a way to have checks per-branch

Meaning if targeting develop, check X If targeting master, check Y

thehanimo commented 9 months ago

Do you think this can be done with if statements in the yaml file to provide different configuration paths for different branches?

jakeleventhal commented 9 months ago

I suppose this solution works, but modifyign the config to support key/value of regex branch mapping would be ideal

// old
{ <config> }

// new
{
  default: <config>
  overrides: {
    [regex1]: {overrides},
    [regex2]: {overrides}
  }
}