Skip to content

Commit 2cd0b2a

Browse files
committed
Fix issue write
1 parent 37facbf commit 2cd0b2a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/issue-write.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ jobs:
9393
9494
var pr_number = 0;
9595
gql_result.repository.ref.associatedPullRequests.nodes.forEach((pr) => {
96-
if (pr.baseRepository.owner.login = context.repo.owner && pr.state == 'OPEN') {
96+
97+
// The largest PR number is the one we care about. The only way to have two associated
98+
// pull requests is if all the old pull requests in the closed state.
99+
if (pr.baseRepository.owner.login = context.repo.owner && pr.number > pr_number) {
97100
pr_number = pr.number;
98101
}
99102
});

0 commit comments

Comments
 (0)