Skip to content

Commit

Permalink
server: improve testmerge worker 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizzonium committed Oct 6, 2024
1 parent dc015e6 commit 226b9a8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/testmerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ jobs:
const labeledPRs = [];
for (const pr of pullRequests) {
if (pr.labels.some(label => label.name === label_needed)) {
const prInfo = await github.rest.pulls.get({
const { data: status } = await github.rest.repos.getCombinedStatusForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: pr.head.sha
});
const { data: prInfo } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number
});
if (prInfo.data.mergeable) {
if (status.state === 'success' || prInfo.mergeable) {
labeledPRs.push({
number: pr.number,
title: pr.title
Expand Down

0 comments on commit 226b9a8

Please sign in to comment.