|
|
@ -9,7 +9,7 @@ const versionNamePattern = /^v\d+(\.\d+)*$/; |
|
|
|
const masterNamePattern = /^master$/; |
|
|
|
const masterNamePattern = /^master$/; |
|
|
|
|
|
|
|
|
|
|
|
const writeComment = (options, message, callback) => options.github.issues.createComment({ |
|
|
|
const writeComment = (options, message, callback) => options.github.issues.createComment({ |
|
|
|
user: options.baseRepoOptions.owner, |
|
|
|
owner: options.baseRepoOptions.owner, |
|
|
|
repo: options.baseRepoOptions.reponame, |
|
|
|
repo: options.baseRepoOptions.reponame, |
|
|
|
number: options.number, |
|
|
|
number: options.number, |
|
|
|
body: message |
|
|
|
body: message |
|
|
@ -21,15 +21,15 @@ const closePullRequest = (options, message, callback) => writeComment(options, m |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return options.github.issues.edit({ |
|
|
|
return options.github.issues.edit({ |
|
|
|
user: options.baseRepoOptions.owner, |
|
|
|
owner: options.baseRepoOptions.owner, |
|
|
|
repo: options.baseRepoOptions.reponame, |
|
|
|
repo: options.baseRepoOptions.reponame, |
|
|
|
number: options.number, |
|
|
|
number: options.number, |
|
|
|
state: "closed" |
|
|
|
state: "closed" |
|
|
|
}, callback); |
|
|
|
}, callback); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const checkHasIssue = (options, issueNumber, callback) => options.github.issues.getRepoIssue({ |
|
|
|
const checkHasIssue = (options, issueNumber, callback) => options.github.issues.get({ |
|
|
|
user: options.baseRepoOptions.owner, |
|
|
|
owner: options.baseRepoOptions.owner, |
|
|
|
repo: options.baseRepoOptions.reponame, |
|
|
|
repo: options.baseRepoOptions.reponame, |
|
|
|
number: issueNumber |
|
|
|
number: issueNumber |
|
|
|
}, (err, result) => { |
|
|
|
}, (err, result) => { |
|
|
@ -48,7 +48,7 @@ const checkHasIssue = (options, issueNumber, callback) => options.github.issues. |
|
|
|
return callback(undefined, true, result.title); |
|
|
|
return callback(undefined, true, result.title); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const checkHasReleases = (options, callback) => options.github.releases.listReleases({ |
|
|
|
const checkHasReleases = (options, callback) => options.github.repos.getReleases({ |
|
|
|
owner: options.baseRepoOptions.owner, |
|
|
|
owner: options.baseRepoOptions.owner, |
|
|
|
repo: options.baseRepoOptions.reponame, |
|
|
|
repo: options.baseRepoOptions.reponame, |
|
|
|
per_page: 1 |
|
|
|
per_page: 1 |
|
|
|