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

feat(core): deploy CLI - add support for git url "insteadOf": use 'remote get-url' to determine source repo url #8397

Merged
merged 1 commit into from Nov 30, 2022

Conversation

friederbluemle
Copy link
Contributor

A minor simplification/optimization in the way the repo source url is determined during deployment.

Instead of directly extracting the raw value from config, use the more idiomatic, built-in command:

git remote get-url origin

It has the added benefit that a potential insteadOf configuration is also taken into account.

See git remote man page for additional details.

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 30, 2022
@netlify
Copy link

netlify bot commented Nov 30, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit fb815ee
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6386c71a00c06000092777b0
😎 Deploy Preview https://deploy-preview-8397--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟢 93 🟢 97 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 77 🟢 100 🟢 100 🟢 100 🟢 90 Report

@slorber slorber changed the title Use 'remote get-url' to determine source repo url fix: use 'remote get-url' to determine source repo url Nov 30, 2022
@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Nov 30, 2022
@slorber slorber changed the title fix: use 'remote get-url' to determine source repo url feat(deploy): add support for git url "insteadOf": use 'remote get-url' to determine source repo url Nov 30, 2022
@slorber slorber added pr: new feature This PR adds a new API or behavior. pr: bug fix This PR fixes a bug in a past release. and removed pr: bug fix This PR fixes a bug in a past release. labels Nov 30, 2022
@slorber
Copy link
Collaborator

slorber commented Nov 30, 2022

Makes sense and looks safe to merge thanks

Can you explain the motivation to use insteadOf with Docusaurus? I'm not very familiar with this git feature so curious to know more

@slorber slorber changed the title feat(deploy): add support for git url "insteadOf": use 'remote get-url' to determine source repo url feat(core): deploy CLI - add support for git url "insteadOf": use 'remote get-url' to determine source repo url Nov 30, 2022
@slorber slorber merged commit c9c1fac into facebook:main Nov 30, 2022
@slorber slorber added the to backport This PR is planned to be backported to a stable version of Docusaurus label Jan 26, 2023
slorber pushed a commit that referenced this pull request Jan 26, 2023
@slorber slorber added backported This PR has been backported to a stable version of Docusaurus and removed to backport This PR is planned to be backported to a stable version of Docusaurus labels Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR has been backported to a stable version of Docusaurus CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants