Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 437340f

Browse files
committedJul 21, 2023
Add config to skip commits without prs
1 parent 4d5502f commit 437340f

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed
 

‎src/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ async function run() {
102102
);
103103
}
104104

105+
if (config.user.skipCommitsWithoutPullRequest && !pr) {
106+
continue;
107+
}
108+
105109
if (pr?.labels.some((l) => config.user.skipLabels?.includes(l))) {
106110
console.log(
107111
c.yellow("# Skipping commit / PR by label:"),

‎src/utils/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const defaultUserConfig: UserConfig = {
6262
},
6363
],
6464
skipLabels: ["skip-release", "skip-changelog"],
65+
skipCommitsWithoutPullRequest: true,
6566
};
6667

6768
export async function getConfig(): Promise<Config> {

‎src/utils/types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ export type UserConfig = Partial<{
9797
}[];
9898

9999
skipLabels: string[];
100+
101+
skipCommitsWithoutPullRequest: boolean;
100102
}>;
101103

102104
export const defineConfig = (config: UserConfig) => config;

0 commit comments

Comments
 (0)
Please sign in to comment.