github icon indicating copy to clipboard operation
github copied to clipboard

PRs are no longer resolved with closed/fixed keywords

Open wolfy1339 opened this issue 1 year ago • 4 comments

It seems that something has broken and semantic release is unable to resolve PRs in commit bodies. It used to do this without any issue at all.

There isn't any custom plugins used, it's the default configuration for semantic-release

2024-10-16T18:34:23.1319049Z [6:34:23 PM] [semantic-release] › ✘  An error occurred while running semantic-release: Error: Could not resolve to an Issue with the number of 267.
2024-10-16T18:34:23.1321128Z     at file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/aggregate-error/index.js:23:26
2024-10-16T18:34:23.1322288Z     at Array.map (<anonymous>)
2024-10-16T18:34:23.1323330Z     at new AggregateError (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/aggregate-error/index.js:16:19)
2024-10-16T18:34:23.1324520Z     at file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/pipeline.js:55:13
2024-10-16T18:34:23.1325975Z     at async pluginsConfigAccumulator.<computed> [as success] (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/index.js:87:11)
2024-10-16T18:34:23.1327783Z     at async run (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:218:3)
2024-10-16T18:34:23.1329601Z     at async Module.default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:278:22)
2024-10-16T18:34:23.1330894Z     at async default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/cli.js:55:5) {
2024-10-16T18:34:23.1331726Z   type: 'NOT_FOUND',
2024-10-16T18:34:23.1332520Z   path: [ 'repository', 'issue267' ],
2024-10-16T18:34:23.1333070Z   locations: [ { line: 4, column: 9 } ],
2024-10-16T18:34:23.1333614Z   pluginName: '@semantic-release/github'
2024-10-16T18:34:23.1334031Z }
2024-10-16T18:34:23.1334443Z AggregateError: 
2024-10-16T18:34:23.1334899Z     Error: Could not resolve to an Issue with the number of 267.
2024-10-16T18:34:23.1335449Z         at Array.map (<anonymous>)
2024-10-16T18:34:23.1336396Z         at file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/pipeline.js:55:13
2024-10-16T18:34:23.1338074Z         at async pluginsConfigAccumulator.<computed> [as success] (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/index.js:87:11)
2024-10-16T18:34:23.1341059Z         at async run (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:218:3)
2024-10-16T18:34:23.1343204Z         at async Module.default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:278:22)
2024-10-16T18:34:23.1344423Z         at async default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/cli.js:55:5)
2024-10-16T18:34:23.1345631Z     at file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/pipeline.js:55:13
2024-10-16T18:34:23.1347355Z     at async pluginsConfigAccumulator.<computed> [as success] (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/index.js:87:11)
2024-10-16T18:34:23.1349001Z     at async run (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:218:3)
2024-10-16T18:34:23.1350285Z     at async Module.default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:278:22)
2024-10-16T18:34:23.1352639Z     at async default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/cli.js:55:5) {
2024-10-16T18:34:23.1353870Z   errors: [
2024-10-16T18:34:23.1354450Z     Error: Could not resolve to an Issue with the number of 267.
2024-10-16T18:34:23.1355396Z         at file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/aggregate-error/index.js:23:26
2024-10-16T18:34:23.1356207Z         at Array.map (<anonymous>)
2024-10-16T18:34:23.1357248Z         at new AggregateError (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/aggregate-error/index.js:16:19)
2024-10-16T18:34:23.1358507Z         at file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/pipeline.js:55:13
2024-10-16T18:34:23.1359994Z         at async pluginsConfigAccumulator.<computed> [as success] (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/lib/plugins/index.js:87:11)
2024-10-16T18:34:23.1361466Z         at async run (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:218:3)
2024-10-16T18:34:23.1362687Z         at async Module.default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/index.js:278:22)
2024-10-16T18:34:23.1363932Z         at async default (file:///home/runner/.npm/_npx/cdf31b77322f1d44/node_modules/semantic-release/cli.js:55:5) {
2024-10-16T18:34:23.1364808Z       type: 'NOT_FOUND',
2024-10-16T18:34:23.1365287Z       path: [Array],
2024-10-16T18:34:23.1365697Z       locations: [Array],
2024-10-16T18:34:23.1366306Z       pluginName: '@semantic-release/github'
2024-10-16T18:34:23.1366783Z     }
2024-10-16T18:34:23.1367098Z   ]
2024-10-16T18:34:23.1751193Z }

https://github.com/probot/pino/actions/runs/11371733573/job/31634467759?pr=321

wolfy1339 avatar Oct 16 '24 18:10 wolfy1339

seems also related to https://github.com/semantic-release/semantic-release/discussions/3476

@babblebey could this be related to a recent change?

travi avatar Oct 16 '24 18:10 travi

could this be related to a recent change?

Yes @travi, looks related to an error from the GraphQL call to get details for resolved issue in PR body.

Quick question @wolfy1339, is the entity with number 267 a PR or an Issue???

I ask this because I think this might be some edge case I've left unaddressed, i.e. if 267 is a PR and not an issue then a graphql call to repository.issue for that entity might return nothing.

Thinking out loud 🤔

babblebey avatar Oct 16 '24 21:10 babblebey

Quick question @wolfy1339, is the entity with number 267 a PR or an Issue???

That would be a PR

wolfy1339 avatar Oct 16 '24 21:10 wolfy1339

That would be a PR

Then, that's the edge case! Should patch a fix for this in a bit 🤌🏾

The solution would be to try ignore empty responses from parsed issue number in PR body/Commits messages, this because not all these numbers belong to an issue, some are PRs (like in your case where a PR is linked to be closed by another PR).

Got any thoughts on this!??? 🤔

babblebey avatar Oct 16 '24 23:10 babblebey

I just tried to release my package and got this error

https://github.com/AllanOricil/nrg/actions/runs/11545022673/job/32131354251

2 Weeks ago it was working with no issues https://github.com/AllanOricil/nrg/actions/runs/11317709036

AllanOricil avatar Oct 28 '24 00:10 AllanOricil

:tada: This issue has been resolved in version 11.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Nov 06 '24 18:11 github-actions[bot]

I'm adding this here since it seems related but it could have completely different root cause though. When I use the plugin with the default configuration I get the the same error as above but the strange thing is that the PR/issue number the plugin tried to retrieve is much higher than the highest PR/issue number I have in my repo. This does only happen sometimes and I could not yet find out what this depends on.

Does anyone have an idea?

davemaier avatar Feb 21 '25 10:02 davemaier