-
Notifications
You must be signed in to change notification settings - Fork 129
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
fix: failing release due to renamed repository #878
Conversation
…tory name has been changed"`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nits but otherwise good to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
🎉 This issue has been resolved in version 10.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This change is not compatible for users using .releaserc |
@gr2m breaking change...just because we have an https:// URL in our |
@gr2m also I can't seem to make this error go away. The |
@@ -139,6 +139,17 @@ By default the \`repositoryUrl\` option is retrieved from the \`repository\` pro | |||
}; | |||
} | |||
|
|||
export function EMISMATCHGITHUBURL() { | |||
return { | |||
message: "The git repository URL mismatches the GitHub URL.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gr2m @babblebey it would be a lot more convenient to include the two values that didn't match in an error message like this
This Pull request introduces an extra step in the plugin
verify
lifecycle which verifies that therepositoryUrl
and/or project package.json'srepository
field matches the project's current GitHub URL. This throws an errorEMISMATCHGITHUBURL
which confirms mismatch and suggests a fix.Changes Made
Added a logic that requests the repo details leveraging the github get-a-repository endpoint, and checks for a
status
of200
and a match between the response data'sclone_url
value and thecontext.options.repositoryUrl
. And it should only run this when we agithubToken
is authenticated and we do not have theEINVALIDPROXY
andEMISSINGREPO
error.Added a new error helper function
EMISMATCHGITHUBURL
for theRelated Issue
Fixes #803
Screencast/Screenshot
screencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.07.14-11_29_00.webm