-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#43: Inform user, if new version of an already discovered artifact is…
… available (#44) * #43 Rename canSkip to isAlreadyLatestVersion - also use filterNot instead of negation in method * #43 Refactoring: Use logger in mojo - instead of println * #43 Add test for isAlreadyLatestVersion Co-Authored-By: Sandra Parsick <[email protected]> * #43: Add UpdateBranch value, extract update candidates Co-Authored-By: Sandra Parsick <[email protected]> * #43 Refactoring: Add UpdateBranchName data class - also extract update candidates Co-Authored-By: Sandra Parsick <[email protected]> * #43 Refactoring: Use prefix() in toString() - also add TODO for next steps Co-Authored-By: Sandra Parsick <[email protected]> * Add Codespaces Settings * update init command * Move dependency:go-offline to init * #43 Fix test after rebase * #43 Remove Gitpod and Devcontainer files * #43 Add check if remote branch with prefix exists Co-Authored-By: Sandra Parsick <[email protected]> * #43: Add skipping dependency update if a branch already exists for a previous version Co-Authored-By: Georg Berky <[email protected]> Co-authored-by: Sandra Parsick <[email protected]> Co-authored-by: Sandra Parsick <[email protected]>
- Loading branch information
1 parent
122ce21
commit 24da1c9
Showing
12 changed files
with
311 additions
and
102 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
7 changes: 3 additions & 4 deletions
7
src/main/kotlin/io/github/georgberky/maven/plugins/depsupdate/GitProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
package io.github.georgberky.maven.plugins.depsupdate | ||
|
||
interface GitProvider : AutoCloseable { | ||
|
||
fun hasRemoteBranch(remoteBranchName: String) : Boolean | ||
|
||
fun hasRemoteBranch(remoteBranchName: String): Boolean | ||
fun hasRemoteBranchWithPrefix(remoteBranchNamePrefix: String): Boolean | ||
fun checkoutNewBranch(branchName: String) | ||
fun add(filePattern: String) | ||
fun commit(author: String, email: String, message: String) | ||
fun push(localBranchName: String) | ||
fun checkoutInitialBranch() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,7 +96,18 @@ abstract class GitProviderTest() { | |
providerUnderTest.checkoutInitialBranch() | ||
|
||
assertThat(localGitRepo.repository.branch).isEqualTo(initialBranch) | ||
} | ||
|
||
@Test | ||
fun `has remote branch with prefix`() { | ||
remoteGitRepo.branchCreate().setName("branchName-suffix").call() | ||
localGitRepo.fetch().call() | ||
|
||
val hasRemoteBranchWithPrefix = providerUnderTest.hasRemoteBranchWithPrefix("branchName"); | ||
|
||
assertThat(hasRemoteBranchWithPrefix) | ||
.describedAs("remote branch with prefix should exist") | ||
.isTrue() | ||
} | ||
|
||
private fun setupLocalGitRepoAsCloneOf(remoteGitDirectory: URI) { | ||
|
@@ -117,4 +128,4 @@ abstract class GitProviderTest() { | |
remoteGitRepo.add().addFilepattern(fileToCommit.name).call() | ||
remoteGitRepo.commit().setAuthor("Georg", "[email protected]").setMessage("init").call() | ||
} | ||
} | ||
} |
Oops, something went wrong.