Skip to content

Commit

Permalink
fix: pending
Browse files Browse the repository at this point in the history
  • Loading branch information
xrkffgg committed Feb 22, 2021
1 parent aeb7e36 commit 7acce8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6035,8 +6035,11 @@ async function run() {
for (let i = 0; i < filterPRs.length; i++) {
let number = filterPRs[i];
const result = await getPRStatus(owner, repo, number);
if (result.commitState !== 'pending' && result.ifCICompleted) {
if (result.commitState === 'success' && !result.ifCIHasFailure) {
if (result.ifCICompleted) {
if (
(result.commitState === 'success' || result.commitState === 'pending') &&
!result.ifCIHasFailure
) {
if (successReview === 'true') {
await doPRReview(owner, repo, number, 'APPROVE', successReviewBody);
}
Expand Down
7 changes: 5 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ async function run() {
for (let i = 0; i < filterPRs.length; i++) {
let number = filterPRs[i];
const result = await getPRStatus(owner, repo, number);
if (result.commitState !== 'pending' && result.ifCICompleted) {
if (result.commitState === 'success' && !result.ifCIHasFailure) {
if (result.ifCICompleted) {
if (
(result.commitState === 'success' || result.commitState === 'pending') &&
!result.ifCIHasFailure
) {
if (successReview === 'true') {
await doPRReview(owner, repo, number, 'APPROVE', successReviewBody);
}
Expand Down

0 comments on commit 7acce8f

Please sign in to comment.