[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add failure description support #16

Merged
merged 16 commits into from
Apr 29, 2020
Prev Previous commit
Next Next commit
Update README.md
  • Loading branch information
yogevbd committed Apr 29, 2020
commit 3eb838fcc7f6874a3dbbf4cb6d241b8383ec00d0
2 changes: 1 addition & 1 deletion .github/workflows/enforce-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
enforce-label:
runs-on: ubuntu-latest
steps:
- uses: yogevbd/enforce-label-action@descriptionSupport
- uses: yogevbd/enforce-label-action@master
with:
REQUIRED_LABELS_ANY: "bug,enhancement,skip-changelog"
BANNED_LABELS: "banned"
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,28 @@ Enforce choosing label before merging PR. Usefull for generating automatic chang
Create `.github/workflows/enforce-labels.yml` containing:

```yml
name: Require PR label
name: Enforce PR labels for Github Actions

on:
pull_request:
types: [opened, labeled, unlabeled]

types: [labeled, unlabeled, opened, edited, synchronize]
jobs:
require-label:
enforce-label:
runs-on: ubuntu-latest
steps:
- uses: yogevbd/enforce-label-action@2.0.0
- uses: yogevbd/enforce-label-action@2.1.0
with:
REQUIRED_LABELS_ANY: "bug,enhancement,wontfix"
REQUIRED_LABELS_ALL: "required"
REQUIRED_LABELS_ANY: "bug,enhancement,skip-changelog"
REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['bug','enhancement','skip-changelog']"
BANNED_LABELS: "banned"


```
**`REQUIRED_LABELS_ANY`**: Force PR's to have at least one label, accepts multiple labels seperated by a comma.
**`REQUIRED_LABELS_ALL`**: Force PR's to have all labels, accepts multiple labels seperated by a comma.
**`BANNED_LABELS`**: Prevent PR's with those labels to be merged, accepts multiple labels seperated by a comma.

### Descriptions
**`REQUIRED_LABELS_ANY_DESCRIPTION`**: Controls the required any labels failure description. Default is `Please select one of the required labels for this PR: ${requiredLabelsAny}`.
**`REQUIRED_LABELS_ALL_DESCRIPTION`**: Controls the required all labels failure description. Default is `All labels are required for this PR: ${requiredLabelsAll}`.
**`BANNED_LABELS_DESCRIPTION`**: Controls the banned failure description. Default is `${bannedLabel.name} label is banned`.