tgstation-server 6.12.0
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 ValueTask CheckoutObject(
55 string committish,
56 string? username,
57 string? password,
58 bool updateSubmodules,
59 bool moveCurrentReference,
60 JobProgressReporter progressReporter,
61 CancellationToken cancellationToken);
62
75 ValueTask<TestMergeResult> AddTestMerge(
76 TestMergeParameters testMergeParameters,
77 string committerName,
78 string committerEmail,
79 string? username,
80 string? password,
81 bool updateSubmodules,
82 JobProgressReporter progressReporter,
83 CancellationToken cancellationToken);
84
94 ValueTask FetchOrigin(
95 JobProgressReporter progressReporter,
96 string? username,
97 string? password,
98 bool deploymentPipeline,
99 CancellationToken cancellationToken);
100
111 ValueTask ResetToOrigin(
112 JobProgressReporter progressReporter,
113 string? username,
114 string? password,
115 bool updateSubmodules,
116 bool deploymentPipeline,
117 CancellationToken cancellationToken);
118
126 Task ResetToSha(string sha, JobProgressReporter progressReporter, CancellationToken cancellationToken);
127
137 ValueTask<bool?> MergeOrigin(
138 JobProgressReporter progressReporter,
139 string committerName,
140 string committerEmail,
141 bool deploymentPipeline,
142 CancellationToken cancellationToken);
143
156 ValueTask<bool> Synchronize(
157 JobProgressReporter progressReporter,
158 string? username,
159 string? password,
160 string committerName,
161 string committerEmail,
162 bool synchronizeTrackedBranch,
163 bool deploymentPipeline,
164 CancellationToken cancellationToken);
165
172 ValueTask CopyTo(string path, CancellationToken cancellationToken);
173
181 Task<bool> CommittishIsParent(string committish, CancellationToken cancellationToken);
182
188 Task<string> GetOriginSha(CancellationToken cancellationToken);
189
196 Task<DateTimeOffset> TimestampCommit(string sha, CancellationToken cancellationToken);
197 }
198}
Represents an on-disk git repository.
Task< DateTimeOffset > TimestampCommit(string sha, CancellationToken cancellationToken)
Gets the DateTimeOffset a given sha was created on.
ValueTask 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...
string Reference
The current reference the IRepository HEAD is using. This can be a branch or tag.
Task< string > GetOriginSha(CancellationToken cancellationToken)
Get the tracked reference's current SHA.
bool Tracking
If Reference tracks an upstream branch.
ValueTask CopyTo(string path, CancellationToken cancellationToken)
Copies the current working directory to a given path .
ValueTask< bool > Synchronize(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...
ValueTask< 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.
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< bool > CommittishIsParent(string committish, CancellationToken cancellationToken)
Check if a given committish is a parent of the current Head.
ValueTask CheckoutObject(string committish, string? username, string? password, bool updateSubmodules, bool moveCurrentReference, JobProgressReporter progressReporter, CancellationToken cancellationToken)
Checks out a given committish .
Task< bool > IsSha(string committish, CancellationToken cancellationToken)
Checks if a given committish is a sha.
ValueTask FetchOrigin(JobProgressReporter progressReporter, string? username, string? password, bool deploymentPipeline, CancellationToken cancellationToken)
Fetch commits from the origin repository.
Uri Origin
The current origin remote the IRepository is using.
ValueTask< 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.