Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Custom reviewer #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat: Custom reviewer #22

wants to merge 1 commit into from

Conversation

potato4d
Copy link
Member

This pull-request is a part of #20

Changes

  • reviewer config now use env vars instead of hard coding

Copy link
Member

@re-fort re-fort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 しました!

@@ -45,6 +45,8 @@ let repo = new Repo(
}
)

let reviewers = process.env.REVIEWERS.split(',') || 're-fort,kazupon,potato4d'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こっちのほうがよさそうかな、と!

const reviewers = process.env.REVIEWERS.split(',') || []

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確かに 🙇

@@ -137,7 +139,7 @@ const after = async (item, shortHash, issueNo = null) => {
const { data: pullRequest } = await github.createPullRequest(remote, { title: Utility.removeHash(item.title), body, branch: shortHash })
if (!pullRequest) return
Utility.log('S', `Created new pull request: ${pullRequest.html_url}`)
await github.assignReviewers(remote, { number: pullRequest.number, reviewers: ['re-fort', 'kazupon', 'potato4d'] })
await github.assignReviewers(remote, { number: pullRequest.number, reviewers: reviewers })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

みたいな感じかなと

if (reviewers.length > 0) {
  await github.assignReviewers(remote, { number: pullRequest.number, reviewers })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants