Normally when running GitHub Actions on a pull request, what is checked out is 
the merge of the pull request with the latest changes on the target branch. 
This ensure that what is tested is as close as possible to what will actually 
be the result of integrating said pull request. 

In our use of GitHub Actions, we don't run directly on pull requests but 
instead allow contributors to run them in their own personal forks. In that 
context, there is no notion of a target branch. However, we can infer the 
target project and branch by encoding this in the workflow file. This allows us 
to perform the same merge manually, and achieve the same behaviour. 

The change also adds an option to disable this automated merge when launching 
the workflow manually, which could be useful when investigating unexpected test 
failures.

Note that downstream projects picking up this change will have to adapt the 
workflow file to keep using these actions for pre-submit testing. This has been 
a common request from downstream projects, but could also be done in a separate 
change (or not at all).

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

Commit messages:
 - Allow opting out of automated merge on manual runs
 - Initial implementation

Changes: https://git.openjdk.java.net/jdk/pull/1801/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1801&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8258477
  Stats: 117 lines in 1 file changed: 116 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1801.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1801/head:pull/1801

PR: https://git.openjdk.java.net/jdk/pull/1801

Reply via email to