Skip to content

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

Conversation

tromai
Copy link
Member

@tromai tromai commented Apr 8, 2024

Closes #693
Closes #332

  • Add generic git service
  • Rename the class and module to LocalRepoGitService.
  • Update the analyzing local repo tutorial to include the step to define the git service in 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.
  • Remember to note that this git service should only be used for local repos.
  • Add integration test case.

@tromai tromai self-assigned this Apr 8, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 8, 2024
@tromai tromai changed the title chore: add generic git service feat: allow defining a git service from defaults.ini Apr 9, 2024
@tromai tromai force-pushed the 693-support-defining-a-generic-git-service-through-defaultsini-for-build-tool-detection branch 2 times, most recently from e7e7b48 to f1dd0a1 Compare April 10, 2024 02:01
@tromai tromai marked this pull request as ready for review April 10, 2024 03:53
@tromai tromai requested a review from behnazh-w as a code owner April 10, 2024 03:53
@nicallen nicallen requested review from nicallen and benmss April 16, 2024 05:01
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:
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in a05ef37


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>`.
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in a05ef37

@tromai tromai force-pushed the 693-support-defining-a-generic-git-service-through-defaultsini-for-build-tool-detection branch from f1dd0a1 to a05ef37 Compare April 17, 2024 00:15
Copy link
Member

@benmss benmss left a 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.

@tromai tromai merged commit d734665 into staging Apr 17, 2024
@tromai tromai deleted the 693-support-defining-a-generic-git-service-through-defaultsini-for-build-tool-detection branch April 17, 2024 23:54
art1f1c3R pushed a commit that referenced this pull request Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support defining a generic Git Service through defaults.ini for build tool detection
4 participants