RFR: 1797: Add support for /backport pull request command [v2]

Zhao Song zsong at openjdk.org
Wed Feb 1 22:48:42 UTC 2023


On Wed, 1 Feb 2023 22:27:50 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> Zhao Song has updated the pull request incrementally with four additional commits since the last revision:
>> 
>>  - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java
>>    
>>    Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>
>>  - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java
>>    
>>    Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>
>>  - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java
>>    
>>    Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>
>>  - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java
>>    
>>    Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>
>
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/IntegrateCommand.java line 246:
> 
>> 244:                 addPrePushComment(pr, amendedHash, rebaseMessage.toString());
>> 245:                 localRepo.push(amendedHash, pr.repository().url(), pr.targetRef());
>> 246:                 processBackportLabel(pr, allComments);
> 
> I think this call should be moved to the top of `markIntegratedAndClosed`. Otherwise, if the bot is interrupted just after line 245, then the next attempt at running `IntegrateCommand` will jump straight into `markIntegratedAndClosed` and skip the backport processing.

I thought of this and call `processBackportLabel` before every `markIntegratedAndClosed` call, so I think the backport processing would not be skipped in any case. But put this method in `markIntegratedAndClosed` is still a good idea. I will do it.

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

PR: https://git.openjdk.org/skara/pull/1466


More information about the skara-dev mailing list