[Cherry-pick] Add automated check for downstream changes #401
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to follow the project's downstream patch policy (see
CONTRIBUTING.md), modifications to the LLVM codebase (all files outside
the arm-software sub-directory, with a few exceptions) need to have a
issue opened in GitHub in order to track the changes, with the pull
request linking to that issue.
This patch implements a Python script and a GitHub workflow to run the
script whenever a pull request is opened or modified. The script takes a
pull request number, and uses the GitHub command-line interface to get
information about which files are changed, and whether the body text of
the pull request contains the required linkage. To determine which files
need tracking, the file changes are compared against the automerge
ignore list, which already contains the rules for which files are
expected to be different. The body text of the pull request can then be
searched for the expectedly formatted tagging.
Automating the check with a GitHub workflow should ensure downstream
changes are properly tracked and that anyone making a downstream change
is aware of the downstream patch policy.
This currently does not check whether a pull request which states that
it removes a downstream change actually completely removes a downstream
change. That will require additional scripting, to follow later.
This cherry-picks the changes from #351 into the 20.x release branch.