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

fix(command line): markdown_root url #2513

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sambacha
Copy link
Contributor

@sambacha sambacha commented Jul 25, 2024

  • Fixes the path to correctly have tree in front of the {branch} for generating a correct URL.

  • Fixes replacing tree/ with blob/HEAD so that the generated URL does not have to define the default branch name in the case that master is not the default branch name.

Note that to return blob/HEAD the supplied URL must contain tree/, this does not provide a detection in the case that the first URL is incorrect.

- Fixes the path to correctly have `tree` in front of the `{branch}` for generating a correct URL.

- Fixes replacing `tree/` with `blob/HEAD` so that the generated URL does not have to define the default branch name in the case that `master` is not the default branch name.
@0xalpharush
Copy link
Contributor

Can you give an example for when this isn't working? It works like slither . --checklist --markdown-root https://github.com/ORG/REPO/blob/COMMIT/ normally

@sambacha
Copy link
Contributor Author

Can you give an example for when this isn't working? It works like slither . --checklist --markdown-root https://github.com/ORG/REPO/blob/COMMIT/ normally

When just using the remote origin URL, i.e. https://github.com/ORG/REPO/

Screenshot 2024-07-25 at 11 18 27 AM

I understand for GitHub Workflow CI this works:

        slither-args: --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/

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.

2 participants