@semantic-release/github 11.0.3 → 11.0.5
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.
- package/README.md +1 -1
- package/lib/find-sr-issues.js +2 -21
- package/lib/success.js +6 -8
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[**semantic-release**](https://github.com/semantic-release/semantic-release) plugin to publish a
|
|
4
4
|
[GitHub release](https://help.github.com/articles/about-releases) and comment on released Pull Requests/Issues.
|
|
5
5
|
|
|
6
|
-
[](https://github.com/semantic-release/github/actions/workflows/test.yml?query=branch%3Amaster)
|
|
7
7
|
|
|
8
8
|
[](https://www.npmjs.com/package/@semantic-release/github)
|
|
9
9
|
[](https://www.npmjs.com/package/@semantic-release/github)
|
package/lib/find-sr-issues.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { uniqBy } from "lodash-es";
|
|
2
2
|
import { ISSUE_ID, RELEASE_FAIL_LABEL } from "./definitions/constants.js";
|
|
3
3
|
|
|
4
|
-
export default async (octokit, logger,
|
|
4
|
+
export default async (octokit, logger, labels, owner, repo) => {
|
|
5
5
|
let issues = [];
|
|
6
6
|
|
|
7
7
|
const {
|
|
@@ -18,25 +18,6 @@ export default async (octokit, logger, title, labels, owner, repo) => {
|
|
|
18
18
|
|
|
19
19
|
issues.push(...issueNodes);
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* BACKWARD COMPATIBILITY: Fallback to the search API if the issue was not found in the GraphQL response.
|
|
23
|
-
* This fallback will be removed in a future release
|
|
24
|
-
*/
|
|
25
|
-
if (issueNodes.length === 0) {
|
|
26
|
-
try {
|
|
27
|
-
const {
|
|
28
|
-
data: { items: backwardIssues },
|
|
29
|
-
} = await octokit.request("GET /search/issues", {
|
|
30
|
-
q: `in:title+repo:${owner}/${repo}+type:issue+state:open+${title}`,
|
|
31
|
-
});
|
|
32
|
-
issues.push(...backwardIssues);
|
|
33
|
-
} catch (error) {
|
|
34
|
-
logger.log(
|
|
35
|
-
"An error occured fetching issue via fallback (with GH SearchAPI)",
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
21
|
const uniqueSRIssues = uniqBy(
|
|
41
22
|
issues.filter((issue) => issue.body && issue.body.includes(ISSUE_ID)),
|
|
42
23
|
"number",
|
|
@@ -46,7 +27,7 @@ export default async (octokit, logger, title, labels, owner, repo) => {
|
|
|
46
27
|
};
|
|
47
28
|
|
|
48
29
|
/**
|
|
49
|
-
* GraphQL Query to
|
|
30
|
+
* GraphQL Query to get the semantic-release issues for a repository.
|
|
50
31
|
*/
|
|
51
32
|
const loadGetSRIssuesQuery = `#graphql
|
|
52
33
|
query getSRIssues($owner: String!, $repo: String!, $filter: IssueFilters) {
|
package/lib/success.js
CHANGED
|
@@ -265,15 +265,13 @@ export default async function success(pluginConfig, context, { Octokit }) {
|
|
|
265
265
|
|
|
266
266
|
if (failComment === false || failTitle === false) {
|
|
267
267
|
logger.log("Skip closing issue.");
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
octokit,
|
|
271
|
-
logger,
|
|
272
|
-
failTitle,
|
|
273
|
-
labels,
|
|
274
|
-
owner,
|
|
275
|
-
repo,
|
|
268
|
+
logger.warn(
|
|
269
|
+
`DEPRECATION: 'false' for 'failComment' or 'failTitle' is deprecated and will be removed in a future major version. Use 'failCommentCondition' instead.`,
|
|
276
270
|
);
|
|
271
|
+
} else if (failCommentCondition === false) {
|
|
272
|
+
logger.log("Skip closing issue.");
|
|
273
|
+
} else {
|
|
274
|
+
const srIssues = await findSRIssues(octokit, logger, labels, owner, repo);
|
|
277
275
|
|
|
278
276
|
debug("found semantic-release issues: %O", srIssues);
|
|
279
277
|
|
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": "11.0.
|
|
4
|
+
"version": "11.0.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",
|
|
7
7
|
"ava": {
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
"url-join": "^5.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"ava": "6.
|
|
43
|
+
"ava": "6.4.1",
|
|
44
44
|
"c8": "10.1.3",
|
|
45
|
-
"cpy": "
|
|
45
|
+
"cpy": "12.0.1",
|
|
46
46
|
"cz-conventional-changelog": "3.3.0",
|
|
47
47
|
"fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1",
|
|
48
48
|
"lockfile-lint": "4.14.1",
|
|
49
49
|
"ls-engines": "0.9.3",
|
|
50
|
-
"npm-run-all2": "8.0.
|
|
51
|
-
"prettier": "3.
|
|
50
|
+
"npm-run-all2": "8.0.4",
|
|
51
|
+
"prettier": "3.6.2",
|
|
52
52
|
"publint": "0.3.12",
|
|
53
|
-
"semantic-release": "24.2.
|
|
54
|
-
"sinon": "
|
|
53
|
+
"semantic-release": "24.2.7",
|
|
54
|
+
"sinon": "21.0.0",
|
|
55
55
|
"tempy": "3.1.0"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"github>semantic-release/.github:renovate-config"
|
|
128
128
|
]
|
|
129
129
|
},
|
|
130
|
-
"packageManager": "npm@11.4.
|
|
130
|
+
"packageManager": "npm@11.4.1"
|
|
131
131
|
}
|