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.2
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.3
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on May 8, 2019

  1. Copy the full SHA
    6f92175 View commit details

Commits on May 12, 2019

  1. Copy the full SHA
    acda05b View commit details
Showing with 8 additions and 8 deletions.
  1. +0 −1 lib/fail.js
  2. +1 −5 lib/success.js
  3. +7 −2 package.json
1 change: 0 additions & 1 deletion lib/fail.js
Original file line number Diff line number Diff line change
@@ -30,7 +30,6 @@ module.exports = async (pluginConfig, context) => {

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

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

if (state === 'closed') {
// eslint-disable-next-line camelcase
const comment = {owner, repo, issue_number: issue.number, body};
debug('create comment: %O', comment);
const {
@@ -128,7 +125,6 @@ module.exports = async (pluginConfig, context) => {
srIssues.map(async issue => {
debug('close issue: %O', issue);
try {
// eslint-disable-next-line camelcase
const updateIssue = {owner, repo, issue_number: issue.number, state: 'closed'};
debug('closing issue: %O', updateIssue);
const {
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
"bottleneck": "^2.0.1",
"debug": "^4.0.0",
"dir-glob": "^2.0.0",
"fs-extra": "^7.0.0",
"fs-extra": "^8.0.0",
"globby": "^9.0.0",
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.1",
@@ -108,6 +108,11 @@
},
"xo": {
"prettier": true,
"space": true
"space": true,
"rules": {
"camelcase": ["error", {
"allow": ["issue_number", "pull_number"]
}]
}
}
}