@semantic-release/github 7.0.6 → 7.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/verify.js +8 -0
  2. package/package.json +1 -1
package/lib/verify.js CHANGED
@@ -69,6 +69,14 @@ module.exports = async (pluginConfig, context) => {
69
69
  },
70
70
  } = await github.repos.get({repo, owner});
71
71
  if (!push) {
72
+ // If authenticated as GitHub App installation, `push` will always be false.
73
+ // We send another request to check if current authentication is an installation.
74
+ // Note: we cannot check if the installation has all required permissions, it's
75
+ // up to the user to make sure it has
76
+ if (await github.request('HEAD /installation/repositories', {per_page: 1}).catch(() => false)) {
77
+ return;
78
+ }
79
+
72
80
  errors.push(getError('EGHNOPERMISSION', {owner, repo}));
73
81
  }
74
82
  } catch (error) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semantic-release/github",
3
3
  "description": "semantic-release plugin to publish a GitHub release and comment on released Pull Requests/Issues",
4
- "version": "7.0.6",
4
+ "version": "7.0.7",
5
5
  "author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",
6
6
  "ava": {
7
7
  "files": [