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(content-docs): read last update from inner git repositories #6592

Merged
merged 1 commit into from
Feb 3, 2022
Merged

fix(content-docs): read last update from inner git repositories #6592

merged 1 commit into from
Feb 3, 2022

Conversation

felipecrs
Copy link
Contributor

@felipecrs felipecrs commented Feb 3, 2022

This reapplies #5048, because it somehow got reverted during a refactoring (I believe).

To prevent it from happening again in future, I added a comment in the code.

This also:

  • Expand -1 into --max-count=1 (long options are always preferred for better readability)

  • Add -- to prevent file names who looks like git options to clash

  • Check if the file exists before issuing git and return a proper error message

    • git log is known to return exit code 0 but no output in some cases, such as when using -- and the file does not exist
    • If preferred, I can instead check if stdout is empty rather than proactively checking the file

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

netlify bot commented Feb 3, 2022

✔️ [V2]
Built without sensitive environment variables

🔨 Explore the source changes: 5612b60

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61fb5241e206bf0007da92c0

😎 Browse the preview: https://deploy-preview-6592--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 90
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 92

Lighthouse ran on https://deploy-preview-6592--docusaurus-2.netlify.app/

@felipecrs
Copy link
Contributor Author

One check cancelled? Should I do something?

@Josh-Cena Josh-Cena added the pr: bug fix This PR fixes a bug in a past release. label Feb 3, 2022
@Josh-Cena Josh-Cena changed the title fix: read last update from inner git repositories fix(content-docs): read last update from inner git repositories Feb 3, 2022
Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

Thanks! It makes sense to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants