-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support cloning via VCS tokens (#102)
* support cloning via VCS tokens * refresh tokens if they expire within two days, create tokens with a default expiry date of today + 6 months
- Loading branch information
1 parent
7b35e68
commit 4c3337e
Showing
12 changed files
with
329 additions
and
167 deletions.
There are no files selected for viewing
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
18 changes: 18 additions & 0 deletions
18
src/main/java/edu/kit/kastel/sdq/artemis4j/grading/git/CloningStrategy.java
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* Licensed under EPL-2.0 2024. */ | ||
package edu.kit.kastel.sdq.artemis4j.grading.git; | ||
|
||
import edu.kit.kastel.sdq.artemis4j.ArtemisNetworkException; | ||
import edu.kit.kastel.sdq.artemis4j.grading.ArtemisConnection; | ||
import org.eclipse.jgit.api.CloneCommand; | ||
import org.eclipse.jgit.api.errors.GitAPIException; | ||
|
||
public interface CloningStrategy { | ||
/** | ||
* Clones a repository using the given command and connection. | ||
* | ||
* @param repositoryUrl The (HTTPS) URL of the repository to clone. | ||
* @param command Preconfigured clone command. Strategy implementations must set the URI and everything authentication-related. | ||
*/ | ||
void performClone(String repositoryUrl, CloneCommand command, ArtemisConnection connection) | ||
throws ArtemisNetworkException, GitAPIException; | ||
} |
Oops, something went wrong.