Skip to content

Rethrow createRelease error - #242

Merged
matejfalat merged 1 commit into
mainfrom
dont-fail-silently-on-failed-github-release
Jul 23, 2026
Merged

Rethrow createRelease error#242
matejfalat merged 1 commit into
mainfrom
dont-fail-silently-on-failed-github-release

Conversation

@matejfalat

Copy link
Copy Markdown
Contributor

Closes #241

@matejfalat
matejfalat requested a review from Siegrift July 23, 2026 08:10
console.info(`Unable to create Github release`);
console.info(goRes.error.message);
return null;
throw goRes.error;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Actually, now that I think about it - it's possible projects would not want to use the GH_ACCESS_TOKEN at all. I think for those it makes sense to use the previous behaviour.

I think a better way would be check whether the token exists and if yes (and the release failed) throw. Otherwise, just print the message.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There's still this check above which I kept in:

  if (!process.env.GH_ACCESS_TOKEN) {
    console.info(`GH_ACCESS_TOKEN not set. Skipping release creation`);
    return null;
  }

@Siegrift Siegrift left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍 LGTM (the check I didn't see from the GH diff and forgot about)

@matejfalat
matejfalat merged commit 0db33e5 into main Jul 23, 2026
4 checks passed
@matejfalat
matejfalat deleted the dont-fail-silently-on-failed-github-release branch July 23, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrectly scoped token silently fails to create GH release

2 participants