Skip to content

Add require_changelog workflow action #1051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Oct 23, 2020
Merged

Conversation

waylan
Copy link
Member

@waylan waylan commented Oct 22, 2020

This action checks that an update was made to any file in docs/change_log/
but only if changes were made to files in markdown/. Presumably,
any changes outside of markdown/ do not affect the behavior and do not
require a notation in the change_log.

When a change_log entry is missing, a comment is added to the PR informing
the PR author. If a later commit to the PR includes a change_log entry,
then the comment is hidden. A comment should only be added once per PR.

This action checks that an update was made to any file in docs/change_log/
but only if changes were made to files in markdown/. Presumably,
any changes outside of markdown/ do not affect the behavior and do not
require a notation in the change_log.

When a change_log entry is missing, a comment is added to the PR informing
the PR author. If a later commit to the PR includes a change_log entry,
then the comment is hidden. A comment should only be added once per PR.
@waylan
Copy link
Member Author

waylan commented Oct 22, 2020

I looked at the following actions before settling on the first one.

  1. Missing Changelog Reminder

    I chose this one because it provides a regex for the changelog path. As we sometimes have updates to the change_log and other times have updates to a release notes file, this was the best way to include both. However, there are some PRs (like this one) which wouldn't necessarily need a changelog entry. Therefore we can use the include option to narrow the check to changes within the markdown/ dir. It will also add a comment to the PR when an update to the PR is missing as a reminder to the author.

  2. Changelog Reminder

    This appears to be a simpler variation on the previous one. It does not support the include option and would run the check for all changes. There is no way to conditionally disable the check. It also adds a comment to the PR.

  3. Changelog Enforcer

    This takes a filename rather than a regex and assumes the changelog is a single file, which won't work for us. A nice feature is the ability to disable the check by assigning a specific label to the PR. There is no way to add a comment to the PR with this.

  4. Changelog checker

    This appears to be a clone of the previous item in that the feature set is exactly the same.

@waylan
Copy link
Member Author

waylan commented Oct 23, 2020

Hmm, well it seems to be working except for posting the comment. We're getting Error: Resource not accessible by integration. After doing some searching I finally landed upon GitHub Actions improvements for fork and pull request workflows which explains how to work around the fact that a PR from a fork does not normally have write permissions on the base repo.

@waylan
Copy link
Member Author

waylan commented Oct 23, 2020

Well, that's annoying. Switching from the pull_request event to the pull_request_target event causes the entire action to no longer even be listed as an action.

@waylan
Copy link
Member Author

waylan commented Oct 23, 2020

Setting the message to an empty string does not disable the comment feature of the action. Guess I'll just leave it alone and we can ignore the error message. The fact that the test fails under the correct conditions should be enough to remind everyone.

@waylan waylan merged commit 897c854 into Python-Markdown:master Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant