Skip to content

Commit

Permalink
feat: move option lintPullRequestTitleWithConventionalCommit out of e…
Browse files Browse the repository at this point in the history
…xperimental
  • Loading branch information
christophehurpeau committed Nov 10, 2023
1 parent 3d0fb3e commit 28db2b2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/accountConfigs/christophehurpeau.ts
Expand Up @@ -9,8 +9,8 @@ const config: Config<never> = {
autoMergeWithSkipCi: false,
deleteAfterMerge: true,
},
lintPullRequestTitleWithConventionalCommit: true,
experimentalFeatures: {
lintPullRequestTitleWithConventionalCommit: true,
conventionalCommitBangBreakingChange: true,
betterSlackify: true,
},
Expand Down
1 change: 1 addition & 0 deletions src/accountConfigs/defaultConfig.ts
Expand Up @@ -4,6 +4,7 @@ import type { Config } from './types';
const config: Config<never> = {
autoAssignToCreator: true,
trimTitle: true,
lintPullRequestTitleWithConventionalCommit: false,
requiresReviewRequest: false,
prDefaultOptions: {
autoMerge: false,
Expand Down
2 changes: 1 addition & 1 deletion src/accountConfigs/types.ts
Expand Up @@ -62,7 +62,6 @@ export interface LabelsConfig {
}

interface ExperimentalFeatures {
lintPullRequestTitleWithConventionalCommit?: true;
conventionalCommitBangBreakingChange?: true;
betterSlackify?: true;
}
Expand All @@ -75,6 +74,7 @@ interface WarnOnForcePushAfterReviewStarted {
export interface Config<TeamNames extends string> {
autoAssignToCreator?: boolean;
trimTitle?: boolean;
lintPullRequestTitleWithConventionalCommit?: boolean;
ignoreRepoPattern?: string;
requiresReviewRequest?: boolean;
autoMergeRenovateWithSkipCi?: boolean;
Expand Down
5 changes: 1 addition & 4 deletions src/events/pr-handlers/actions/editOpenedPR.ts
Expand Up @@ -90,10 +90,7 @@ export const editOpenedPR = async <
const statuses: ReviewflowStatus[] = [];
let errorStatus: StatusInfo | undefined;

if (
repoContext.config.experimentalFeatures
?.lintPullRequestTitleWithConventionalCommit
) {
if (repoContext.config.lintPullRequestTitleWithConventionalCommit) {
try {
const lintOutcome = await lintCommitMessage(title);
if (!lintOutcome.valid) {
Expand Down

0 comments on commit 28db2b2

Please sign in to comment.