-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into chore/integrated-code-lifecycle/add-build…
…-agent-name
- Loading branch information
Showing
21 changed files
with
392 additions
and
49 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
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
34 changes: 34 additions & 0 deletions
34
...in/java/de/tum/cit/aet/artemis/programming/service/localvc/LocalVCFetchPreUploadHook.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,34 @@ | ||
package de.tum.cit.aet.artemis.programming.service.localvc; | ||
|
||
import java.util.Collection; | ||
|
||
import jakarta.servlet.http.HttpServletRequest; | ||
|
||
import org.eclipse.jgit.lib.ObjectId; | ||
import org.eclipse.jgit.transport.PreUploadHook; | ||
import org.eclipse.jgit.transport.UploadPack; | ||
|
||
public class LocalVCFetchPreUploadHook implements PreUploadHook { | ||
|
||
private final LocalVCServletService localVCServletService; | ||
|
||
private final HttpServletRequest request; | ||
|
||
public LocalVCFetchPreUploadHook(LocalVCServletService localVCServletService, HttpServletRequest request) { | ||
this.localVCServletService = localVCServletService; | ||
this.request = request; | ||
} | ||
|
||
@Override | ||
public void onBeginNegotiateRound(UploadPack uploadPack, Collection<? extends ObjectId> collection, int clientOffered) { | ||
localVCServletService.updateVCSAccessLogForCloneAndPullHTTPS(request, clientOffered); | ||
} | ||
|
||
@Override | ||
public void onEndNegotiateRound(UploadPack uploadPack, Collection<? extends ObjectId> collection, int i, int i1, boolean b) { | ||
} | ||
|
||
@Override | ||
public void onSendPack(UploadPack uploadPack, Collection<? extends ObjectId> collection, Collection<? extends ObjectId> collection1) { | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...java/de/tum/cit/aet/artemis/programming/service/localvc/LocalVCFetchPreUploadHookSSH.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,37 @@ | ||
package de.tum.cit.aet.artemis.programming.service.localvc; | ||
|
||
import java.nio.file.Path; | ||
import java.util.Collection; | ||
|
||
import org.apache.sshd.server.session.ServerSession; | ||
import org.eclipse.jgit.lib.ObjectId; | ||
import org.eclipse.jgit.transport.PreUploadHook; | ||
import org.eclipse.jgit.transport.UploadPack; | ||
|
||
public class LocalVCFetchPreUploadHookSSH implements PreUploadHook { | ||
|
||
private final LocalVCServletService localVCServletService; | ||
|
||
private final ServerSession serverSession; | ||
|
||
private final Path rootDir; | ||
|
||
public LocalVCFetchPreUploadHookSSH(LocalVCServletService localVCServletService, ServerSession serverSession, Path rootDir) { | ||
this.localVCServletService = localVCServletService; | ||
this.serverSession = serverSession; | ||
this.rootDir = rootDir; | ||
} | ||
|
||
@Override | ||
public void onBeginNegotiateRound(UploadPack uploadPack, Collection<? extends ObjectId> collection, int clientOffered) { | ||
localVCServletService.updateVCSAccessLogForCloneAndPullSSH(serverSession, rootDir, clientOffered); | ||
} | ||
|
||
@Override | ||
public void onEndNegotiateRound(UploadPack uploadPack, Collection<? extends ObjectId> collection, int i, int i1, boolean b) { | ||
} | ||
|
||
@Override | ||
public void onSendPack(UploadPack uploadPack, Collection<? extends ObjectId> collection, Collection<? extends ObjectId> collection1) { | ||
} | ||
} |
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
Oops, something went wrong.