Skip to content

364 add dependency graph to GitHub and gitlab tickets using mermaidjs#427

Merged
timbastin merged 16 commits into
mainfrom
364-add-dependency-graph-to-github-and-gitlab-tickets-using-mermaidjs
Apr 7, 2025
Merged

364 add dependency graph to GitHub and gitlab tickets using mermaidjs#427
timbastin merged 16 commits into
mainfrom
364-add-dependency-graph-to-github-and-gitlab-tickets-using-mermaidjs

Conversation

@Hubtrick-Git
Copy link
Copy Markdown
Collaborator

Issues now show a mermaid flow chart with the individual components in their description . Could need some artistic and formating improvements.

@Hubtrick-Git Hubtrick-Git linked an issue Apr 1, 2025 that may be closed by this pull request
@Hubtrick-Git Hubtrick-Git requested a review from timbastin April 1, 2025 14:58
Comment thread internal/core/integrations/github_integration.go Outdated
Comment thread internal/core/integrations/github_integration.go Outdated
}

// this function returns a string containing a mermaids js flow chart to the given pURL
func (g *gitlabIntegration) renderPathToComponent(assetID uuid.UUID, assetVersionName string, scannerID string, pURL string) (string, error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you can reduce the duplication of this logic by creating its own function, which gets the component repository as parameter. And please write a test for it 🙂

@Hubtrick-Git
Copy link
Copy Markdown
Collaborator Author

Code is ready .The only thing left to do is write tests

@Hubtrick-Git Hubtrick-Git marked this pull request as ready for review April 2, 2025 15:54
Comment thread internal/core/integrations/__debug_bin2147138446 Outdated
Comment thread internal/core/integrations/thirdparty_integration_test.go Outdated
Hubtrick-Git and others added 2 commits April 3, 2025 11:49
removed the debug bin file

Signed-off-by: Patrick <patrick.rissmann@l3montree.com>
@Hubtrick-Git
Copy link
Copy Markdown
Collaborator Author

Disclaimer I know that the FormatNode function should not be public but i can't use it in the integrations_text package otherwise.

Comment thread Makefile Outdated
Comment thread internal/core/integrations/thirdparty_integration_test.go Outdated
@timbastin
Copy link
Copy Markdown
Member

Disclaimer I know that the FormatNode function should not be public but i can't use it in the integrations_text package otherwise.

Maybe it is just simpler to change the mermaidjs diagram from LR to TB?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2025

Merging this branch changes the coverage (1 decrease, 1 increase)

Impacted Packages Coverage Δ 🤖
github.com/l3montree-dev/devguard/internal/core/assetversion 6.06% (ø)
github.com/l3montree-dev/devguard/internal/core/integrations 11.81% (+2.40%) 👍
github.com/l3montree-dev/devguard/internal/core/risk 46.93% (-0.42%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/l3montree-dev/devguard/internal/core/assetversion/asset_version_service.go 0.00% (ø) 235 0 235
github.com/l3montree-dev/devguard/internal/core/integrations/github_integration.go 25.71% (+0.31%) 315 (+4) 81 (+2) 234 (+2) 👍
github.com/l3montree-dev/devguard/internal/core/integrations/gitlab_integration.go 4.54% (-0.04%) 485 (+4) 22 463 (+4) 👎
github.com/l3montree-dev/devguard/internal/core/integrations/thirdparty_integration.go 30.77% (+30.77%) 91 (+28) 28 (+28) 63 🌟
github.com/l3montree-dev/devguard/internal/core/risk/risk_explaination.go 0.00% (ø) 113 (+2) 0 113 (+2)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/l3montree-dev/devguard/internal/core/integrations/github_integration_test.go
  • github.com/l3montree-dev/devguard/internal/core/integrations/thirdparty_integration_test.go

@timbastin timbastin merged commit ce92be7 into main Apr 7, 2025
16 checks passed
@timbastin timbastin deleted the 364-add-dependency-graph-to-github-and-gitlab-tickets-using-mermaidjs branch April 7, 2025 14:20
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 dependency graph to github and gitlab tickets using mermaidjs

2 participants