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

Adds 'Switch' as an Alias for 'Checkout` #5445

Merged
merged 3 commits into from
Apr 13, 2024

Conversation

FutzMonitor
Copy link
Contributor

@FutzMonitor FutzMonitor commented Apr 8, 2024

📑 Summary

Adds switch as an alias for checkout.

Resolves #5422

📏 Design Decisions

Updated the regex that returns CHECKOUT to also work for switch. I added some test coverage to both parser specs.

📋 Tasks

Make sure you

- Updated the regex to allow either 'checkout' or 'switch'
2. Changes to gitGraphParser.spec.js
- Additional test coverage added for the changes made to the parser.
3. Changes to gitGraphParserV2.spec.js
- Additional test coverafe added for the changes made to the parser.
4. Changes to gitgraph.md
- Updated documentation to let users know that checkout/switch can be used interchangeably.
Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit e048085
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/661a1fa71123d50008436aa5
😎 Deploy Preview https://deploy-preview-5445--mermaid-js.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 configuration.

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 5.74%. Comparing base (9ed2f4b) to head (e048085).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #5445      +/-   ##
==========================================
- Coverage     5.74%   5.74%   -0.01%     
==========================================
  Files          276     277       +1     
  Lines        41886   41897      +11     
  Branches       514     489      -25     
==========================================
  Hits          2407    2407              
- Misses       39479   39490      +11     
Flag Coverage Δ
unit 5.74% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

@FutzMonitor FutzMonitor changed the title Addes 'Switch' as an Alias for "Checkout` Adds 'Switch' as an Alias for "Checkout` Apr 8, 2024
@FutzMonitor FutzMonitor changed the title Adds 'Switch' as an Alias for "Checkout` Adds 'Switch' as an Alias for 'Checkout` Apr 8, 2024
Copy link
Member

@sidharthv96 sidharthv96 left a comment

Choose a reason for hiding this comment

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

Wondeful implementation!
Can you add a rendering test as well?

- Added additional rendering test functionality for recognizing 'switch' as an alias to 'checkout'.
@FutzMonitor
Copy link
Contributor Author

Wondeful implementation! Can you add a rendering test as well?

I only added two rendering test because it seems redundant to have switch be tested again every single test that is present for checkout. If this doesn't suffice though let me know, and I'll implement some more.

@sidharthv96 sidharthv96 added this pull request to the merge queue Apr 13, 2024
Merged via the queue into mermaid-js:develop with commit e570863 Apr 13, 2024
19 checks passed
@FutzMonitor FutzMonitor deleted the 5422issue branch April 13, 2024 16:02
@jaschop-1k5o
Copy link

Thanks for taking the time for my issue @FutzMonitor , and with breathtaking speed too!
Much love ❤️ ❤️ ❤️

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.

Add switch as alias of checkout to gitGraph Syntax
3 participants