File: has_changelog.yaml

package info (click to toggle)
python-globus-sdk 4.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,144 kB
  • sloc: python: 35,242; sh: 37; makefile: 35
file content (34 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download
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
name: changelog
on:
  workflow_call:
  pull_request:
    types:
      - labeled
      - unlabeled
      - opened
      - reopened
      - synchronize

jobs:
  check_has_news_in_changelog_dir:
    if: |
      ! (
        contains(github.event.pull_request.labels.*.name, 'no-news-is-good-news') ||
        github.event.pull_request.user.login == 'pre-commit-ci[bot]' ||
        github.event.pull_request.user.login == 'dependabot[bot]'
      )
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
        with:  # do a deep fetch to allow merge-base and diff
          fetch-depth: 0
      - name: check PR adds a news file
        run: |
          news_files="$(git diff --name-only "$(git merge-base origin/main "$GITHUB_SHA")" "$GITHUB_SHA" -- changelog.d/*.rst)"
          if [ -n "$news_files" ]; then
            echo "Saw new files. changelog.d:"
            echo "$news_files"
          else
            echo "No news files seen"
            exit 1
          fi