-
Notifications
You must be signed in to change notification settings - Fork 153
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
feature/add-branch-name #641
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
author Dylan Pulver <[email protected]> 1732560851 -0500 committer Dylan Pulver <[email protected]> 1734466348 -0500 gpgsig -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQR8hu+aMQHwGtOiprRYOGlsgKaxswUCZ2HbLAAKCRBYOGlsgKax s+jrAP97O2+K0k+c7YMwn0JuN9CCAKXSuOo+6e58xt2aThUWoQEA0B00lQhBAZVh qcZOk9sMdVXMHl308FNXDEWbCdFT6Qk= =4jd3 -----END PGP SIGNATURE----- feature/post-prototype feature/add-branch-name (#641) chore:Use specific safety schema version feature/cve-data-filter-flag (#643) chore/release-3.2.12 (#644) feat(utils.py): remove email verification feat(changelog): update version Auth added fix urljoin issue chore:Use specific safety schema version feat(utils.py): remove email verification feat(changelog): update version review changes switch to target drop prefixes fix return code check extract runtime info fix
Summary:
This PR updates the Project dashboard link generation to include the current Git branch name as a query parameter (?branch=<branch_name>). If the branch name cannot be determined (e.g., not in a Git repository), the link defaults to the original behavior without the query parameter.
Changes Made:
Added functionality to fetch the current Git branch using git rev-parse --abbrev-ref HEAD.
Appended the branch name as a URL-encoded query parameter to the project dashboard link.
Ensured fallback to the original URL format if the branch name is unavailable.
Example Output:
With branch name:
https://platform.safetycli.com/projects/<project_id>/findings?branch=feature%2Fexample-branch
Without branch name:
https://platform.safetycli.com/projects/<project_id>/findings