tgstation-server 5.12.7
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IRepository.cs
Go to the documentation of this file.
1using System;
2using System.Threading;
3using System.Threading.Tasks;
4
7
9{
14 {
18 bool Tracking { get; }
19
23 string Head { get; }
24
28 string Reference { get; }
29
33 Uri Origin { get; }
34
41 Task<bool> IsSha(string committish, CancellationToken cancellationToken);
42
54 string committish,
55 string username,
56 string password,
57 bool updateSubmodules,
58 JobProgressReporter progressReporter,
59 CancellationToken cancellationToken);
60
73 Task<TestMergeResult> AddTestMerge(
74 TestMergeParameters testMergeParameters,
75 string committerName,
76 string committerEmail,
77 string username,
78 string password,
79 bool updateSubmodules,
80 JobProgressReporter progressReporter,
81 CancellationToken cancellationToken);
82
93 JobProgressReporter progressReporter,
94 string username,
95 string password,
96 bool deploymentPipeline,
97 CancellationToken cancellationToken);
98
110 JobProgressReporter progressReporter,
111 string username,
112 string password,
113 bool updateSubmodules,
114 bool deploymentPipeline,
115 CancellationToken cancellationToken);
116
124 Task ResetToSha(string sha, JobProgressReporter progressReporter, CancellationToken cancellationToken);
125
135 Task<bool?> MergeOrigin(
136 JobProgressReporter progressReporter,
137 string committerName,
138 string committerEmail,
139 bool deploymentPipeline,
140 CancellationToken cancellationToken);
141
154 Task<bool> Sychronize(
155 JobProgressReporter progressReporter,
156 string username,
157 string password,
158 string committerName,
159 string committerEmail,
160 bool synchronizeTrackedBranch,
161 bool deploymentPipeline,
162 CancellationToken cancellationToken);
163
170 Task CopyTo(string path, CancellationToken cancellationToken);
171
179 Task<bool> ShaIsParent(string sha, CancellationToken cancellationToken);
180
186 Task<string> GetOriginSha(CancellationToken cancellationToken);
187
194 Task<DateTimeOffset> TimestampCommit(string sha, CancellationToken cancellationToken);
195 }
196}
Parameters for creating a TestMerge.
Represents an on-disk git repository.
Definition: IRepository.cs:14
Task FetchOrigin(JobProgressReporter progressReporter, string username, string password, bool deploymentPipeline, CancellationToken cancellationToken)
Fetch commits from the origin repository.
Task CheckoutObject(string committish, string username, string password, bool updateSubmodules, JobProgressReporter progressReporter, CancellationToken cancellationToken)
Checks out a given committish .
Task ResetToOrigin(JobProgressReporter progressReporter, string username, string password, bool updateSubmodules, bool deploymentPipeline, CancellationToken cancellationToken)
Requires the current HEAD to be a tracked reference. Hard resets the reference to what it tracks on t...
Task< DateTimeOffset > TimestampCommit(string sha, CancellationToken cancellationToken)
Gets the DateTimeOffset a given sha was created on.
string Reference
The current reference the IRepository HEAD is using. This can be a branch or tag.
Definition: IRepository.cs:28
Task< string > GetOriginSha(CancellationToken cancellationToken)
Get the tracked reference's current SHA.
bool Tracking
If Reference tracks an upstream branch.
Definition: IRepository.cs:18
Task< bool > ShaIsParent(string sha, CancellationToken cancellationToken)
Check if a given sha is a parent of the current Head.
Task< bool?> MergeOrigin(JobProgressReporter progressReporter, string committerName, string committerEmail, bool deploymentPipeline, CancellationToken cancellationToken)
Requires the current HEAD to be a tracked reference. Merges the reference to what it tracks on the or...
string Head
The SHA of the IRepository HEAD.
Definition: IRepository.cs:23
Task ResetToSha(string sha, JobProgressReporter progressReporter, CancellationToken cancellationToken)
Requires the current HEAD to be a reference. Hard resets the reference to the given sha.
Task< TestMergeResult > AddTestMerge(TestMergeParameters testMergeParameters, string committerName, string committerEmail, string username, string password, bool updateSubmodules, JobProgressReporter progressReporter, CancellationToken cancellationToken)
Attempt to merge the revision specified by a given set of testMergeParameters into HEAD.
Task< bool > IsSha(string committish, CancellationToken cancellationToken)
Checks if a given committish is a sha.
Task CopyTo(string path, CancellationToken cancellationToken)
Copies the current working directory to a given path .
Uri Origin
The current origin remote the IRepository is using.
Definition: IRepository.cs:33
Task< bool > Sychronize(JobProgressReporter progressReporter, string username, string password, string committerName, string committerEmail, bool synchronizeTrackedBranch, bool deploymentPipeline, CancellationToken cancellationToken)
Runs the synchronize event script and attempts to push any changes made to the IRepository if on a tr...