GIT push & Pull requests example workflow#22
Open
ivanzolotuhin wants to merge 1 commit intoJetBrains:masterfrom
Open
GIT push & Pull requests example workflow#22ivanzolotuhin wants to merge 1 commit intoJetBrains:masterfrom
ivanzolotuhin wants to merge 1 commit intoJetBrains:masterfrom
Conversation
oleg-larshin
left a comment
There was a problem hiding this comment.
Hello,
It is possible to get newly added pull requests with the added collection:
ctx.issue.pullRequests.added
(see Set for more info)
Also, you can create a local variable and use the switch statement to make the code more compact:
var issue = ctx.issue;
var fs = issue.fields;
switch(issue.pullRequests.added.first().state.name) {
case "OPEN":
fs.State = ctx.State.Review;
break;
...
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
There is no git events related workflow example in the repo and luck of examples in public internet.
Used this article as starting point https://habr.com/ru/company/JetBrains/blog/512880/