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

Tag a commit separate from the line defining the commit in gitGraph #5486

Closed
ketozhang opened this issue Apr 23, 2024 · 1 comment
Closed
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@ketozhang
Copy link

ketozhang commented Apr 23, 2024

Proposal

In git, you can tag the HEAD (current commit).

In mermaid, tagging can only be done as part of commit. This creates an awkward syntax forcing tagging to happen on a non-release branch (e.g., dev or feature branch) when in reality most tag on the release or default branch (e.g., main)

Example

Desired syntax:

gitGraph
  commit
  commit

  branch dev
  commit
  commit id: "abcdef"

  checkout main
  merge dev
  tag "v1.0.0"  %% optionally you may add id: "abcdef"

Expected Output
Similar to this, but ideally the tag should be placed on the merge node (open circle).

gitGraph
  commit
  commit
  
  branch dev
  commit
  commit id: "abcdef" tag: "v1.0.0"
  
  checkout main
  merge dev
Loading

Screenshots

No response

@ketozhang ketozhang added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Apr 23, 2024
@ketozhang
Copy link
Author

ketozhang commented Apr 23, 2024

This is already accomodated using merge tags (#3361)

gitGraph
  commit
  commit

  branch dev
  commit
  commit id: "abcdef"

  checkout main
  merge dev tag: "v1.0.0"
gitGraph
  commit
  commit

  branch dev
  commit
  commit id: "abcdef"

  checkout main
  merge dev tag: "v1.0.0"
Loading

This solves my use case, but having tag as a declarative action might still be useful for other use cases. Closing... Others should request to reopen with their use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant