wei / pull

🤖 Keep your forks up-to-date via automated PRs

Home Page:https://github.com/apps/pull

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Label not creating when upsteam branch updates more than once within [Pull]PR opened period

michaeljin89757 opened this issue · comments

image
michaeljin89757/BoTest#3

image
michaeljin89757/BoTest#2

As shown in pictures above, when there are updates happened within [Pull]PR opened period the pull bot did not create the pull label as expected.

Hi @michaeljin89757 thanks for the report!

The label should have been added as soon as the PR is created.

In the PR you shared, we can see that this update snippet did not work because the PR body was not updated and the tag also not added:

pull/lib/pull.js

Lines 198 to 205 in f5d246c

await this.github.issues.update({
owner: this.config.owner,
repo: this.config.repo,
issue_number: createdPR.data.number,
assignees,
labels: [this.config.label],
body: helper.getPRBody(this.config.repoPath, prNumber)
})

The only thing I can think of is GitHub taking its time to calculate mergability state and causing updates to the PR to fail. I need to step through and see if this is the case and report to GitHub. Thanks again!

If anyone can help reproduce this with maybe a couple curls, that would help me tremendously!

commented

The only thing I can think of is GitHub taking its time to calculate mergability state and causing updates to the PR to fail. Or it's not creating PR and not processing the rest of the commands