-
-
Notifications
You must be signed in to change notification settings - Fork 6
Special support for Mergify config changes #113
Special support for Mergify config changes #113
Conversation
**NOTE** Merge with caution: once this is merged, the next propagation of changes to the template repos won't auto-merge because Mergify doesn't auto-merge when its rules are being changed. (tracked as #113) For regular PRs: * include CLA validation success * block if more reviews are requested For TemplateControl's PRs: * block if more reviews are requested * block if changes requested * block on block-merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I run it using option --no-push
and got an error. Not related to the flag, but it seems that it's trying to create the forks locally more then once.
[error] (run-main-0) java.nio.file.FileAlreadyExistsException: /Users/renato/GitHub/playframework/templatecontrol/PR-113/target/forks
[error] java.nio.file.FileAlreadyExistsException: /Users/renato/GitHub/playframework/templatecontrol/PR-113/target/forks
[error] at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88)
[error] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
[error] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
[error] at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
[error] at java.nio.file.Files.createDirectory(Files.java:674)
[error] at templatecontrol.TemplateControl$.tempDirectory(TemplateControl.scala:299)
[error] at templatecontrol.TemplateControl.$anonfun$runTemplate$1(TemplateControl.scala:76)
[error] at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:658)
[error] at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error] at scala.util.Success.map(Try.scala:213)
[error] at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error] at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error] at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
[error] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
[error] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
[error] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
[error] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Nope, I'm wrong on that. |
[error] (run-main-2) java.nio.file.FileAlreadyExistsException: /d/templatecontrol/target/forks [error] java.nio.file.FileAlreadyExistsException: /d/templatecontrol/target/forks [error] at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:94) [error] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) [error] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) [error] at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:385) [error] at java.base/java.nio.file.Files.createDirectory(Files.java:689) [error] at templatecontrol.TemplateControl$.tempDirectory(TemplateControl.scala:299) [error] at templatecontrol.TemplateControl.$anonfun$runTemplate$1(TemplateControl.scala:76)
My play-scala-macwire-di-example fork still has 2.6.x as the default branch (the official template repo has 2.7.x as the default). So in order to checkout the target branch, while having both an origin remote (mine) and an upstream remote (playframework), we have to first, conditionally, create the branch, then check it out. For some reason in git (both in JGit and in console git) there is no one command for this, thus the use of "if".
@renatocaval all fixed |
Mergify won't operate when a PR changes its own configuration.
I think TemplateControl should have special support for this.
Perhaps it could send the Mergify PRs separately, so they don't stop regular updates from automatically merging when CI validation passes?