-
Notifications
You must be signed in to change notification settings - Fork 29
feat: allow defining a git service from defaults.ini #694
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
feat: allow defining a git service from defaults.ini #694
Conversation
e7e7b48
to
f1dd0a1
Compare
docs/source/pages/using.rst
Outdated
If the repository remote URL is from an unknown git service (see :ref:`Git Services <supported_git_services>` for a list of supported git services in Macaron), Macaron won't recognize it when analyzing the repository. | ||
|
||
You would need to tell Macaron about that git service through the ``defaults.ini`` config. | ||
For example, let's say you want to analyze the Bitbucket repository at ``https://bitbucket.org/snakeyaml/snakeyaml``. First, you need to create a ``defaults.ini`` file in the current workspace with the following content: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure using bitbucket.org
as the example is a good idea, since this is a well-known public git service that in principle we should support at some point, rendering this example meaningless (and the same goes for any other real public git service one might choose). Using a nonexistent hostname as the example (e.g. git.example.com
) would probably be better, at the cost of making the example not concretely executable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Using bitbucket.org
is not the best way to demonstrate an unknown generic git service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in a05ef37
docs/source/pages/using.rst
Outdated
|
||
The ``-lr`` flag configure Macaron to looks into ``path/to/boo/foo`` for local repositories. For more information, please see :ref:`Command Line Usage <cli-usage>`. | ||
The ``-lr`` flag tells Macaron to look into ``path/to/boo/foo`` for local repositories. For more information, please see :ref:`Command Line Usage <cli-usage>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path/to/boo/foo
-> ./boo/foo
to be consistent with the change above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in a05ef37
f1dd0a1
to
a05ef37
Compare
src/macaron/slsa_analyzer/git_service/local_repo_git_service.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Signed-off-by: Trong Nhan Mai <[email protected]>
Closes #693
Closes #332
LocalRepoGitService
.defaults.ini
. We should also document that if a domain is already supported in other services, it doesn't need to be allowed in this service.