Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcea4a39

Browse files
committed
ci: improve theme preview action
This commit makes sure that theme PRs that contain invalid JSON arelabeled `invalid` and changes are requested.
1 parentaae83cb commitcea4a39

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

‎scripts/preview-theme.js‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const THEME_PR_FAIL_TEXT = ":x: Theme PR does not adhere to our guidelines.";
2424
constTHEME_PR_SUCCESS_TEXT=
2525
":heavy_check_mark: Theme PR does adhere to our guidelines.";
2626
constFAIL_TEXT=`
27-
\rUnfortunately, your theme PR does not adhere to our [theme guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution). Please fix the issues below, and we will review your\
27+
\r Unfortunately, your theme PR contains an error or does not adhere to our [theme guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution). Please fix the issues below, and we will review your\
2828
\r PR again. This pull request will **automatically close in 15 days** if no changes are made. After this time, you must re-open the PR for it to be reviewed.
2929
`;
3030
constTHEME_CONTRIB_GUIDELINESS=`
@@ -558,6 +558,21 @@ export const run = async (prNumber) => {
558558
info(`DRY_RUN: Review reason:${reviewReason}`);
559559
}
560560
}catch(error){
561+
debug("Set review state to `REQUEST_CHANGES` and add `invalid` label...");
562+
if(!dryRun){
563+
awaitaddReview(
564+
octokit,
565+
pullRequestId,
566+
owner,
567+
repo,
568+
"REQUEST_CHANGES",
569+
error.message,
570+
);
571+
awaitaddRemoveLabel(octokit,pullRequestId,owner,repo,"invalid",true);
572+
}else{
573+
info(`DRY_RUN: Review state: REQUEST_CHANGES`);
574+
info(`DRY_RUN: Review reason:${error.message}`);
575+
}
561576
setFailed(error.message);
562577
}
563578
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp