Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error handling for non existent releases #178

Merged
merged 16 commits into from Nov 21, 2022

Conversation

guilhermelimak
Copy link
Collaborator

No description provided.

Improve logging.
Move code that gets the release commit hash inside try..catch.
@github-actions
Copy link

No linked issues found. Please add the corresponding issues in the pull request description.
Use GitHub automation to close the issue when a PR is merged

Copy link
Contributor

@simoneb simoneb left a comment

Choose a reason for hiding this comment

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

This looks good to me but apart from error handling it doesn't seem to introduce any functional changes from the original implementation. I don't mind merging it, but did we figure out what was the cause of the issue?

src/openPr.js Outdated Show resolved Hide resolved
Copy link
Contributor

@simoneb simoneb left a comment

Choose a reason for hiding this comment

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

I'll approve to avoid blocking. Needless to say it would be ideal to figure out the cause of the issue

Copy link
Contributor

@simoneb simoneb left a comment

Choose a reason for hiding this comment

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

let's repurpose this PR in terms of failing consistently when something unexpected happens:

  1. the draft release could not be created
  2. the draft release could not be found when trying to turn it into a published release

@guilhermelimak guilhermelimak changed the title Fix/fix release not being created Improve error handling for non existent releases Nov 18, 2022
@guilhermelimak
Copy link
Collaborator Author

@simoneb I changed some small stuff and fixed the tests. After a quick review it should be ready to merge.

It should now fail in both cases:

  1. the draft release could not be created
  2. the draft release could not be found when trying to turn it into a published release

src/openPr.js Outdated Show resolved Hide resolved
src/release.js Outdated Show resolved Hide resolved
test/release.test.js Show resolved Hide resolved
@guilhermelimak guilhermelimak merged commit 0faac5d into main Nov 21, 2022
@guilhermelimak guilhermelimak deleted the fix/fix-release-not-being-created branch November 21, 2022 20:36
@github-actions github-actions bot mentioned this pull request Nov 22, 2022
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.

None yet

2 participants