RFR: 8174: Check license year script may check files not changed by a PR [v2]

Alex Macdonald aptmac at openjdk.org
Mon Feb 12 17:13:12 UTC 2024


> This short PR addresses JMC-8174 [[0]](https://bugs.openjdk.org/browse/JMC-8174), in which the check license year script may fail when checking files not modified by the PR it's running against.
> 
> The issue is that I originally had `origin/master` as the branch the PR would be checked against, forgetting that these checks are run on our own forks and not openjdk/jmc. As a result, if the PR owner's `origin/master` is out of date, then the check license script may incorrectly error even if the PR is okay against `upstream/master`. To amend this I've added a line that greps the result of `git remote -v` and looks for `upstream`, and if it doesn't exist then it adds a new remote and fetches it. Now we can compare the PR commits against `upstream/master`
> 
> [0] https://bugs.openjdk.org/browse/JMC-8174

Alex Macdonald has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains one additional commit since the last revision:

  8174: Check license year script may check files not changed by a PR

-------------

Changes:
  - all: https://git.openjdk.org/jmc/pull/552/files
  - new: https://git.openjdk.org/jmc/pull/552/files/283f04db..603ccdc7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jmc&pr=552&range=01
 - incr: https://webrevs.openjdk.org/?repo=jmc&pr=552&range=00-01

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jmc/pull/552.diff
  Fetch: git fetch https://git.openjdk.org/jmc.git pull/552/head:pull/552

PR: https://git.openjdk.org/jmc/pull/552


More information about the jmc-dev mailing list