Skip to content

fix: remove failTitle arg in findSRIssues call#1164

Merged
travi merged 2 commits intosemantic-release:masterfrom
BinToss:fix/fail-find-sr-issues
Feb 6, 2026
Merged

fix: remove failTitle arg in findSRIssues call#1164
travi merged 2 commits intosemantic-release:masterfrom
BinToss:fix/fail-find-sr-issues

Conversation

@BinToss
Copy link
Contributor

@BinToss BinToss commented Feb 6, 2026

This extraneous argument caused "Error: Variable $owner of type String! was provided invalid value"

Fixes #1163

export default async (octokit, logger, labels, owner, repo) => {

github/lib/fail.js

Lines 59 to 66 in ea6386d

const [srIssue] = await findSRIssues(
octokit,
logger,
failTitle,
labels,
owner,
repo,
);

Image


In the mean time, users can use patch-package or yarn's patch command to patch the issue unofficially.

This extraneous argument caused "Error: Variable $owner of type String! was provided invalid value"

Fixes semantic-release#1163
@BinToss
Copy link
Contributor Author

BinToss commented Feb 6, 2026

I believe findSRIssues should be refactored to take a single object parameter to prevent this off-by-one issue from happening again. But that would entail breaking changes to the internal API.

BinToss added a commit to HaloSPV3/HCE.Shared that referenced this pull request Feb 6, 2026
Fixes that `$owner` error in the plugin's `fail` step.
Copy link
Member

@babblebey babblebey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @BinToss

Wonder how that got there 🫣

Thanks.

@BinToss
Copy link
Contributor Author

BinToss commented Feb 6, 2026

I wonder why Prettier is exiting with an error code.
The warning does not occur in the parent commit despite being stylistically identical. Is there a whitespace or invisible character change I'm not seeing?

Edit: ah. The function call line wrapping condition is no longer met.

diff --git a/lib/fail.js b/lib/fail.js
index 91b147d..2afe1e2 100644
--- a/lib/fail.js
+++ b/lib/fail.js
@@ -56,13 +56,7 @@ export default async function fail(pluginConfig, context, { Octokit }) {
     const body = failComment
       ? template(failComment)({ branch, errors })
       : getFailComment(branch, errors);
-    const [srIssue] = await findSRIssues(
-      octokit,
-      logger,
-      labels,
-      owner,
-      repo,
-    );
+    const [srIssue] = await findSRIssues(octokit, logger, labels, owner, repo);

     const canCommentOnOrCreateIssue = failCommentCondition
       ? template(failCommentCondition)({ ...context, issue: srIssue })

Copy link
Member

@travi travi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@travi travi merged commit f7bdd88 into semantic-release:master Feb 6, 2026
6 checks passed
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

🎉 This PR is included in version 12.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Error: Variable $owner of type String! was provided invalid value

3 participants