Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

Special support for Mergify config changes #113

Merged
merged 19 commits into from
Mar 29, 2019

Conversation

dwijnand
Copy link
Member

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?

dwijnand added a commit that referenced this pull request Mar 6, 2019
**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
Copy link
Contributor

@octonato octonato left a 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)

@octonato
Copy link
Contributor

octonato commented Mar 28, 2019

hmm, that's because play-scala-grpc-example and play-java-grpc-example are twice on the Seq. We should make it a Set if we need to repeat them.

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".
@dwijnand
Copy link
Member Author

@renatocaval all fixed

@dwijnand dwijnand requested a review from octonato March 29, 2019 07:27
@octonato octonato merged commit e0c1cf3 into playframework:master Mar 29, 2019
@dwijnand dwijnand deleted the special-mergify-support branch March 29, 2019 09:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants