File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ module.exports = function createReleasePR (config) {
1313 var template = fs . readFileSync ( templatePath , 'utf8' )
1414 var message = releaseMessage ( template , prs )
1515
16+ client . assignReviewers ( releasePR , prs )
1617 return client . updatePR ( releasePR , message )
1718 } )
1819 } )
Original file line number Diff line number Diff line change @@ -172,6 +172,14 @@ GithubClient.prototype.collectReleasePRs = function (releasePR) {
172172 } )
173173}
174174
175+ GithubClient . prototype . assignReviewers = function ( pr , prs ) {
176+ var reviewers = prs . map ( pr => pr . assignee ? pr . assignee . login : pr . user . login )
177+
178+ return this . post ( this . pullRequestEndpoint ( ) + '/' + pr . number + '/requested_reviewers' , { reviewers } ) . then ( function ( res ) {
179+ return res . body
180+ } )
181+ }
182+
175183GithubClient . prototype . updatePR = function ( pr , data ) {
176184 return this . patch ( this . pullRequestEndpoint ( ) + '/' + pr . number , data ) . then ( function ( res ) {
177185 return res . body
You can’t perform that action at this time.
0 commit comments