Skip to content
Permalink
Browse files
update committers
  • Loading branch information
Ovilia committed Aug 6, 2020
1 parent 5bbfd10 commit 0bb310ea9085dd391e2960bae7ad365e17ce9f39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
@@ -1,5 +1,6 @@
const Issue = require('./src/issue');
const text = require('./src/text');
const isCoreCommitter = require('./src/coreCommitters');

module.exports = app => {
app.on(['issues.opened'], async context => {
@@ -88,13 +89,14 @@ module.exports = app => {
});

app.on(['pull_request.opened'], async context => {
const auth = context.payload.pull_request.author_association;
// const auth = context.payload.pull_request.author_association;
const isCore = isCoreCommitter(context.payload.issue.user.login);
const comment = context.github.issues.createComment(context.issue({
body: isCommitter(auth) ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED
body: isCore ? text.PR_OPENED_BY_COMMITTER : text.PR_OPENED
}));

const labelList = ['PR: awaiting review'];
if (isCommitter(auth)) {
if (isCore) {
labelList.push('PR: author is committer');
}
const addLabel = context.github.issues.addLabels(context.issue({
@@ -3,11 +3,16 @@ const committers = [
'100pah',
'Ovilia',
'deqingli',
'Wdingding',
'susiwen8',
'cuijian-dexter',
'SnailSword',
'plainheart',
'wf123537200'
'wf123537200',
'yufeng04',
'chfw',
'alex2wong',
'ClemMakesApps'
];

function getCoreCommitters() {

0 comments on commit 0bb310e

Please sign in to comment.