File: check-pr.yml

package info (click to toggle)
python-anndata 0.12.7-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,616 kB
  • sloc: python: 21,685; makefile: 23
file content (41 lines) | stat: -rw-r--r-- 1,203 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Pull Request Validation

on:
  pull_request:
    branches:
      - main
      - master
    types:
      # milestone changes
      - milestoned
      - demilestoned
      # label changes for “no milestone”
      - labeled
      - unlabeled
      # initial check
      - opened
      - edited
      - reopened
      # code change (e.g. this workflow)
      - synchronize

env:
  LABELS: ${{ join(github.event.pull_request.labels.*.name, '|') }}

jobs:
  check-milestone:
    name: "Triage: Check PR title, milestone, and labels"
    runs-on: ubuntu-latest
    steps:
      - name: Check if merging isn’t blocked
        uses: flying-sheep/check@v1
        with:
          success: ${{ ! contains(env.LABELS, 'DON’T MERGE') }}
      - name: Check if a milestone is necessary and exists
        uses: flying-sheep/check@v1
        with:
          success: ${{ github.event.pull_request.milestone != null || contains(env.LABELS, 'no milestone') }}
      - name: Check if PR title is valid
        uses: amannn/action-semantic-pull-request@v6
        env: # Needs repo options: “Squash and merge” with commit message set to “PR title”
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}