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

ansible-changelog-fragment check doesn't refer to the PR content, or its error message is unclear #771

Closed
quidame opened this issue Mar 20, 2021 · 1 comment · Fixed by #772

Comments

@quidame
Copy link
Contributor

quidame commented Mar 20, 2021

Ansible Zuul check named ansible-changelog-fragment is not consistent: the error message complains that the PR is missing a changelog fragment, while the code only checks if the LAST commit adds a changelog fragment, not the entire PR.

See also ansible-collections/ansible.posix#156 (comment) for details and rationale.

In the previous link, I suggest to update the error message, but it would probably be smarter to update the check command itself:

      shell: git show --name-status --exit-code --oneline --diff-filter=A | grep changelogs/fragments/

could be replaced by something like:

      shell: git diff --name-status --exit-code --diff-filter=A main | grep changelogs/fragments/

Otherwise contributors have to squash their commits again and again for every changes coming AFTER the add of the changelog fragment. For example when applying changes suggested by a reviewer.

In my opinion, checks should apply to the contents of a PR, whenever these changes have been added in an order or another. What is in the last commit could be just a fix typo, anyway, without the need of subsequent work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant