workflows/labels: label rebuilds immediately
This fixes labeling in the context of the `pull_request` trigger. Of course, this was supposed to immediately label rebuilds after eval finishes, but we somehow lost this along the way. Rebuilds are still labeled fairly soon, because the scheduled trigger will pick up the same PR within 10 minutes again and then apply the rebuild labels. But of course, immediate is better. The reason this happened is, that we're looking at `item.pull_request` only. This is the correct distinction between "issue items" and "pull request items", which we both get back from the /issues endpoint. But the payload for the `pull_request*` event doesn't contain this, so labeling in this case was treated like an issue and skipped the whole pull request part.
This commit is contained in:
parent
9c492c3233
commit
acf5bc2417
@ -235,7 +235,7 @@ module.exports = async function ({ github, context, core, dry }) {
|
||||
|
||||
const itemLabels = {}
|
||||
|
||||
if (item.pull_request) {
|
||||
if (item.pull_request || context.payload.pull_request) {
|
||||
stats.prs++
|
||||
Object.assign(itemLabels, await handlePullRequest(item))
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user