Skip to content

Commit

Permalink
Revert "feat: pr from bot jira-issue"
Browse files Browse the repository at this point in the history
This reverts commit f2441fd.
  • Loading branch information
christophehurpeau committed May 20, 2019
1 parent 1039e9e commit f0b3b35
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 44 deletions.
16 changes: 3 additions & 13 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.

16 changes: 3 additions & 13 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/pr-handlers/actions/editOpenedPR.ts
Expand Up @@ -53,7 +53,7 @@ export const editOpenedPR = async (
if (rule.status && rule.statusInfoFromMatch) {
statuses.push({
name: rule.status,
info: rule.statusInfoFromMatch(match, { bot: isPrFromBot }),
info: rule.statusInfoFromMatch(match),
});
return false;
}
Expand Down
9 changes: 2 additions & 7 deletions src/teamconfigs/ornikar.ts
Expand Up @@ -22,19 +22,14 @@ const config: Config<'dev' | 'design'> = {
},
},
{
bot: false,
regExp: /\s(ONK-(\d+)|\[no issue])$/,
error: {
title: 'Title does not have JIRA issue',
summary: 'The PR title should end with ONK-0000, or [no issue]',
},
status: 'jira-issue',
statusInfoFromMatch: (match, { bot }) => {
if (bot) {
return {
title: 'PR from bot',
summary: '',
};
}
statusInfoFromMatch: (match) => {
const issue = match[1];
if (issue === '[no issue]') {
return {
Expand Down
9 changes: 1 addition & 8 deletions src/teamconfigs/types.ts
Expand Up @@ -15,20 +15,13 @@ export interface Group {
[userName: string]: string;
}

export interface StatusInfoFromMatchOptions {
bot: boolean;
}

export interface ParsePRRule {
bot?: false;
regExp: RegExp;
error: StatusError;

status?: string;
statusInfoFromMatch?: (
match: RegExpMatchArray,
options: StatusInfoFromMatchOptions,
) => StatusInfo;
statusInfoFromMatch?: (match: RegExpMatchArray) => StatusInfo;
}

export interface ParsePR {
Expand Down

0 comments on commit f0b3b35

Please sign in to comment.