()
| 50 | } |
| 51 | |
| 52 | async function validatePullRequest() { |
| 53 | if (isReleasePR()) { |
| 54 | console.log("Ignore changeset check for release PR."); |
| 55 | return; |
| 56 | } |
| 57 | |
| 58 | if (await hasNoChangesetNeededLabel()) { |
| 59 | console.log(`The PR is labeled as '${CHANGESET_LABEL}'`); |
| 60 | return; |
| 61 | } |
| 62 | |
| 63 | if (await hasChangeset()) { |
| 64 | console.log("Changeset found"); |
| 65 | return; |
| 66 | } |
| 67 | |
| 68 | throw new Error("No changeset found"); |
| 69 | } |
| 70 | |
| 71 | await validatePullRequest(); |
no test coverage detected