Skip to content

Commit

Permalink
Document label and milestone actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodmillman committed Jul 1, 2023
1 parent 924ea3a commit b58b34d
Showing 1 changed file with 68 additions and 1 deletion.
69 changes: 68 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,77 @@ _This project is currently in its alpha stage and might be incomplete or change
## Installation

```sh
git clone https://github.com/scientific-python/changelist.git
pip install changelist
```

## Set up your repository

All PRs must have one of the following labels:

- `type: Highlights`
- `type: New features`
- `type: Enhancements`
- `type: Performance`
- `type: Bug fix"`
- `type: API`
- `type: Maintenance`
- `type: Documentation`
- `type: Infrastructure`

### Label checking

To ensure that each PR has one of the above labels attached to it,
we recommend adding the following to `.github/workflows/label-check.yaml`:

```
name: Labels
on:
pull_request:
types:
- opened
- labeled
- unlabeled
env:
LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }}
jobs:
check-type-label:
name: ensure type label
runs-on: ubuntu-latest
steps:
- if: "contains( env.LABELS, 'type: ' ) == false"
run: exit 1
```

### Milestones

We also recommend adding `.github/workflows/milestone-merged-prs.yaml`:

```
name: Milestone
on:
pull_request_target:
types:
- closed
branches:
- "main"
jobs:
milestone_pr:
name: attach to PR
runs-on: ubuntu-latest
steps:
- uses: scientific-python/attach-next-milestone-action@f94a5235518d4d34911c41e19d780b8e79d42238
with:
token: ${{ secrets.MILESTONE_LABELER_TOKEN }}
force: true
```

See https://github.com/scientific-python/attach-next-milestone-action for more information.

## Usage

```sh
Expand Down

0 comments on commit b58b34d

Please sign in to comment.