Skip to content

Commit fb2c741

Browse files
workflows/labels: fix merge conflict label (#419836)
2 parents e19ccb6 + 59ac947 commit fb2c741

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

.github/workflows/labels.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,9 @@ jobs:
136136
const pull_number = item.number
137137
const issue_number = item.number
138138
139-
// The search result is of a format that works for both issues and pull requests and thus
140-
// does not have all fields of a full pull_request response. Notably, it is missing `head.sha`,
141-
// which we need to fetch the workflow run below. This field is already available non-search sources.
142-
// This API request is also important for the merge-conflict label, because it triggers the
139+
// This API request is important for the merge-conflict label, because it triggers the
143140
// creation of a new test merge commit. This is needed to actually determine the state of a PR.
144-
const pull_request = item.head ? item : (await github.rest.pulls.get({
141+
const pull_request = (await github.rest.pulls.get({
145142
...context.repo,
146143
pull_number
147144
})).data

0 commit comments

Comments
 (0)