Skip to content

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

Merged
Josh-Cena merged 1 commit into
facebook:mainfrom
felipecrs:reapply-5048
Feb 3, 2022
Merged

fix(content-docs): read last update from inner git repositories#6592
Josh-Cena merged 1 commit into
facebook:mainfrom
felipecrs:reapply-5048

Conversation

@felipecrs

@felipecrs felipecrs commented Feb 3, 2022

Copy link
Copy Markdown
Contributor

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

netlify Bot commented Feb 3, 2022

Copy link
Copy Markdown

✔️ [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

github-actions Bot commented Feb 3, 2022

Copy link
Copy Markdown

⚡️ 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
Copy Markdown
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

@Josh-Cena Josh-Cena left a comment

Copy link
Copy Markdown
Collaborator

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