Skip to content

Commit

Permalink
feat: default config
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed May 2, 2020
1 parent c3452c4 commit 85fd768
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/index-node10-dev.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node10-dev.cjs.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index-node10.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node10.cjs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/context/repoContext.ts
Expand Up @@ -245,7 +245,7 @@ export const obtainRepoContext = (
const orgConfig = orgsConfigs[owner.login];

if (!orgConfig) {
console.warn(owner.login, Object.keys(orgsConfigs));
console.warn(`using default config for ${owner.login}`);
return null;
}

Expand Down
43 changes: 43 additions & 0 deletions src/orgsConfigs/defaultConfig.ts
@@ -0,0 +1,43 @@
import { Config } from './types';

const config: Config<never, never> = {
autoAssignToCreator: true,
trimTitle: true,
requiresReviewRequest: false,
prDefaultOptions: {
featureBranch: false,
autoMergeWithSkipCi: false,
autoMerge: false,
deleteAfterMerge: true,
},
parsePR: {
title: [],
},
groups: {},
waitForGroups: {},
teams: {},
labels: {
list: {
// /* ci */
// 'ci/in-progress': { name: ':green_heart: ci/in-progress', color: '#0052cc' },
// 'ci/fail': { name: ':green_heart: ci/fail', color: '#e11d21' },
// 'ci/passed': { name: ':green_heart: ci/passed', color: '#86f9b4' },

/* infos */
'breaking-changes': {
name: ':warning: Breaking Changes',
color: '#ef7934',
},
},

review: {
ci: {
inProgress: 'ci/in-progress',
succeeded: 'ci/success',
failed: 'ci/fail',
},
},
},
};

export default config;
3 changes: 3 additions & 0 deletions src/orgsConfigs/index.ts
@@ -1,4 +1,5 @@
import { Config as ConfigType } from './types';
import defaultConfig from './defaultConfig';
import ornikar from './ornikar';
import christophehurpeau from './christophehurpeau';

Expand All @@ -12,6 +13,8 @@ export const orgsConfigs: { [owner: string]: Config } = {
christophehurpeau,
};

export { defaultConfig };

// flat requires node 11
// export const getMembers = <GroupNames extends string = any>(
// groups: Record<GroupNames, Group>,
Expand Down

0 comments on commit 85fd768

Please sign in to comment.