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

feat: use repository url provided as input for finding a commit #622

Merged
merged 4 commits into from
Feb 9, 2024

Conversation

benmss
Copy link
Member

@benmss benmss commented Feb 2, 2024

For cases where the user has provided a PURL with a version but no repository can be found, this PR allows the analysis to succeed as long as the user provides a repository path as well. This differs from the current functionality where if both a PURL and repo are provided, a commit must be too.

An example of this new use case is added in the integration tests:
macaron analyze -purl pkg:maven/org.tinymediamanager/[email protected] -rp https://gitlab.com/tinyMediaManager/tinyMediaManager

Without this new functionality, the above test would fail as the provided version cannot be found by the Repo Finder.

Closes #621

@benmss benmss self-assigned this Feb 2, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 2, 2024
@benmss benmss changed the base branch from main to staging February 2, 2024 06:23
@benmss benmss changed the title Use repository URL provided as input for finding a commit chore: Use repository URL provided as input for finding a commit Feb 2, 2024
@benmss benmss changed the title chore: Use repository URL provided as input for finding a commit chore: use repository url provided as input for finding a commit Feb 2, 2024
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Copy link
Member

@nathanwn nathanwn left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the PR.

@behnazh-w
Copy link
Member

This note in the documentation needs to be updated. Also, please add an example in the documentation to show how both a repo path and a PURL containing a version can be used at the same time.

This PR could also be considered as a feature I think.

@benmss benmss changed the title chore: use repository url provided as input for finding a commit feat: use repository url provided as input for finding a commit Feb 8, 2024
Signed-off-by: Ben Selwyn-Smith <[email protected]>
Copy link
Member

@tromai tromai left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the changes.

@benmss benmss merged commit 380c7d5 into staging Feb 9, 2024
10 checks passed
art1f1c3R pushed a commit that referenced this pull request Nov 29, 2024
This PR allows a user to provide to the command line: a repository URL with no digest alongside a PURL with a version.

Signed-off-by: Ben Selwyn-Smith <[email protected]>
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.

Use repository URL provided as input for finding a commit
4 participants