()
| 45 | } |
| 46 | |
| 47 | async function validatePullRequest() { |
| 48 | if (isReleasePR()) { |
| 49 | console.log("Ignore peer bump check for release PR."); |
| 50 | return; |
| 51 | } |
| 52 | |
| 53 | if (hasNoPeerBumpNeededLabel()) { |
| 54 | console.log(`The PR is labeled as '${PEER_BUMP_LABEL}'`); |
| 55 | return; |
| 56 | } |
| 57 | |
| 58 | if (await hasPeerBumpEntry()) { |
| 59 | console.log("Peer bump entry found"); |
| 60 | return; |
| 61 | } |
| 62 | |
| 63 | throw new Error( |
| 64 | `No peer bump entry found. Either modify ${peerBumpsFile} or add the '${PEER_BUMP_LABEL}' label to this PR.`, |
| 65 | ); |
| 66 | } |
| 67 | |
| 68 | await validatePullRequest(); |
no test coverage detected