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

fix: prefer upstream over origin when getting remote #366

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

lukekarrys
Copy link
Contributor

Fixes #363

@lukekarrys lukekarrys requested a review from a team as a code owner September 17, 2023 02:17
try {
const urlStr = await tryGit(path, 'remote', 'get-url', 'origin')
const urlStr = await tryGit(path, 'remote', 'get-url', remote)
Copy link
Member

Choose a reason for hiding this comment

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

~/D/n/c/b/main (latest|✔) $ git remote get-url upstream
error: No such remote 'upstream'
~/D/n/c/b/main (latest|✔) $ echo $status
2

does this gracefully handle if it's missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it will return undefined if its missing and then move to the next remote

@lukekarrys lukekarrys merged commit f065bcb into main Sep 18, 2023
26 checks passed
@lukekarrys lukekarrys deleted the lk/slimy-deep-megabyte branch September 18, 2023 23:04
@github-actions github-actions bot mentioned this pull request Sep 18, 2023
@rotu
Copy link
Contributor

rotu commented Sep 19, 2023

woohoo! thank you!

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.

package scripts should use upstream, not origin, to set repository.url from git
3 participants