Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add
GitRemote
detection logic (#4381)
* feat: Determine SCM in GitProvenance for more accurate path estimation Determine the SCM from a list of known urls and any manually registered SCMs. The SCM is then used to determine ScmUrlComponents which in turn give information about a repository. * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * rename gitlab scm * Comments * fix tests * fix boolean * fix git provenance tests * Rename to `ScmUrlComponents` to `CloneUrl` and move logic into that * Add full cloneUrl * fully parse on construction * Update rewrite-core/src/test/java/org/openrewrite/scm/GitLabScmTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update rewrite-core/src/main/java/org/openrewrite/scm/AzureDevopsCloneUrl.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Add missing newlines at the end of files * Add missing newline at the end of GitLabScmTest * refactor: Azure devops refactoring (#4378) * refactor: Azure DevOps refactoring. * review changes * review changes --------- Co-authored-by: Peter Streef <[email protected]> * new line? * Lazy initialization * Lombok compiler issue * Update rewrite-core/src/main/java/org/openrewrite/internal/Lazy.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Replace Lazy with `@NonFinal` field * fix message, use getters * feat: Add `GitRemote` detection logic * Cleanup and add new tests * update comment * Don't try to fix the `getOrganizationName(String baseUrl)` to avoid unexpected results (not using the baseUrl) * replace `Optional` * Simplify * Simplify * remove deprecation and fix whitespace * pass null and let `#fromProjectDirectory(Path, BuildEnvironment, GitRemote.Parser)` init instead * add `getRepositoryPath()` instance method * do not update to unknown * no nullable * extract `GitRemote` * license * review comments * add url to message --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tim te Beek <[email protected]> Co-authored-by: bryceatmoderne <[email protected]>
- Loading branch information