RFR: 1215: Clean label not updating correctly

Zhao Song duke at openjdk.org
Tue Oct 4 16:08:04 UTC 2022


On Mon, 3 Oct 2022 22:23:27 GMT, Zhao Song <duke at openjdk.org> wrote:

> Originally, If the user mistakenly creates a Backport PR with the wrong hash and then later corrects it, the clean status is never correctly re-evaluated. 
> 
> Currently, If the user correct the hash, the bot will be forced to do the check again and could correctly add clean label.

bots/pr/src/test/java/org/openjdk/skara/bots/pr/BackportTests.java line 1621:

> 1619:             localRepo.add(newFileSZ);
> 1620:             var releaseHash2 =localRepo.commit(originalMessage, "integrationcommitter1", "integrationcommitter1 at openjdk.org");
> 1621:             localRepo.push(releaseHash2, author.url(), "refs/heads/release", true);

Hi @erikj79 , is this situation possible? I mean if we have a branch named 'release', in the first commit, it added a new file 'a_new_file.txt', in the second commit it added a new file 'a_new_file2.txt'. And we have an edit branch, in its commit, it added a new file 'a_new_file.txt'. Then we create the backport incorrectly with the hash of the second commit of release branch. So the backport is not clean. After that, if we correct the hash to the first commit of release, the check will not run again and the clean label will not be added to the backport.

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

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


More information about the skara-dev mailing list