Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
USER_NAME=vuejs-jp-bot
EMAIL=vuejs-jp-bot@users.noreply.github.com

REVIEWERS=re-fort,kazupon,potato4d

ORIGIN_REPO_URL=git@github.com:vuejs-jp-bot/jp.vuejs.org.git
ORIGIN_REPO_DEFAULT_BRANCH=lang-ja

Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.

確かに 🙇


const setup = () => {
repo.setup()
github.authenticate({ type: 'token', token: process.env.GITHUB_ACCESS_TOKEN })
Expand Down Expand Up @@ -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 })
}

Utility.log('S', 'Assigned reviewers')
}

Expand Down