Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

search for a changelog fragment in the whole PR #812

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions playbooks/ansible-changelog-fragment/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
- name: Check for changelog fragments
args:
chdir: "{{ zuul.executor.src_root }}/{{ zuul.project.canonical_name }}"
shell: git show --name-status --exit-code --oneline --diff-filter=A | grep changelogs/fragments/
command: "git diff origin/{{ zuul.branch }} HEAD --name-status --exit-code --diff-filter=A -- changelogs/fragments/"
register: r
failed_when: r.rc > 1

- name: Changelog fragment failed
fail:
msg: "Your pull-request is missing a changelog fragment, please add one. It should explain to end users the reason for your change."
when: r.rc
when: not r.rc