Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: semantic-release/github
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.3.1
Choose a base ref
...
head repository: semantic-release/github
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.3.2
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Apr 16, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9446a30 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    crazy-max CrazyMax
    Copy the full SHA
    d2d873c View commit details

Commits on Apr 25, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fa677fa View commit details
Showing with 14 additions and 8 deletions.
  1. +2 −1 lib/fail.js
  2. +10 −5 lib/success.js
  3. +2 −2 package.json
3 changes: 2 additions & 1 deletion lib/fail.js
Original file line number Diff line number Diff line change
@@ -30,7 +30,8 @@ module.exports = async (pluginConfig, context) => {

if (srIssue) {
logger.log('Found existing semantic-release issue #%d.', srIssue.number);
const comment = {owner, repo, number: srIssue.number, body};
// eslint-disable-next-line camelcase
const comment = {owner, repo, issue_number: srIssue.number, body};
debug('create comment: %O', comment);
const {
data: {html_url: url},
15 changes: 10 additions & 5 deletions lib/success.js
Original file line number Diff line number Diff line change
@@ -51,8 +51,10 @@ module.exports = async (pluginConfig, context) => {
const prs = await pFilter(
uniqBy(flatten(await Promise.all(searchQueries)), 'number'),
async ({number}) =>
(await github.pullRequests.listCommits({owner, repo, number})).data.find(({sha}) => shas.includes(sha)) ||
shas.includes((await github.pullRequests.get({owner, repo, number})).data.merge_commit_sha)
// eslint-disable-next-line camelcase
(await github.pullRequests.listCommits({owner, repo, pull_number: number})).data.find(({sha}) =>
shas.includes(sha)
) || shas.includes((await github.pullRequests.get({owner, repo, pull_number: number})).data.merge_commit_sha) // eslint-disable-line camelcase
);

debug('found pull requests: %O', prs.map(pr => pr.number));
@@ -76,10 +78,12 @@ module.exports = async (pluginConfig, context) => {
? template(successComment)({branch, lastRelease, commits, nextRelease, releases, issue})
: getSuccessComment(issue, releaseInfos, nextRelease);
try {
const state = issue.state || (await github.issues.get({owner, repo, number: issue.number})).data.state;
// eslint-disable-next-line camelcase
const state = issue.state || (await github.issues.get({owner, repo, issue_number: issue.number})).data.state;

if (state === 'closed') {
const comment = {owner, repo, number: issue.number, body};
// eslint-disable-next-line camelcase
const comment = {owner, repo, issue_number: issue.number, body};
debug('create comment: %O', comment);
const {
data: {html_url: url},
@@ -124,7 +128,8 @@ module.exports = async (pluginConfig, context) => {
srIssues.map(async issue => {
debug('close issue: %O', issue);
try {
const updateIssue = {owner, repo, number: issue.number, state: 'closed'};
// eslint-disable-next-line camelcase
const updateIssue = {owner, repo, issue_number: issue.number, state: 'closed'};
debug('closing issue: %O', updateIssue);
const {
data: {html_url: url},
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -41,13 +41,13 @@
"commitizen": "^3.0.0",
"cz-conventional-changelog": "^2.0.0",
"nock": "^10.0.0",
"nyc": "^13.1.0",
"nyc": "^14.0.0",
"proxy": "^0.2.4",
"proxyquire": "^2.0.0",
"semantic-release": "^15.0.0",
"server-destroy": "^1.0.1",
"sinon": "^7.1.1",
"tempy": "^0.2.1",
"tempy": "^0.3.0",
"xo": "^0.24.0"
},
"engines": {