This repository was archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathIRepositoryService.cs
More file actions
42 lines (39 loc) · 1.65 KB
/
IRepositoryService.cs
File metadata and controls
42 lines (39 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using GitHub.Models;
using GitHub.Primitives;
namespace GitHub.Services
{
public interface IRepositoryService
{
/// <summary>
/// Finds the parent repository of a fork, if any.
/// </summary>
/// <param name="address">The host address.</param>
/// <param name="owner">The repository owner.</param>
/// <param name="name">The repository name.</param>
/// <returns>
/// A tuple of the parent repository's owner and name if the repository is a fork,
/// otherwise null.
/// </returns>
Task<(string owner, string name)?> FindParent(HostAddress address, string owner, string name);
/// <summary>
/// Gets the list of protected branches.
/// </summary>
/// <param name="address">The host address.</param>
/// <param name="owner">The repository owner.</param>
/// <param name="name">The repository name.</param>
/// <returns></returns>
Task<IList<ProtectedBranch>> GetProtectedBranches(HostAddress address, string owner, string name);
/// <summary>
/// Gets the protected branch configuration of a particular branch, if any.
/// </summary>
/// <param name="address">The host address.</param>
/// <param name="owner">The repository owner.</param>
/// <param name="name">The repository name.</param>
/// <param name="branchName"></param>
/// <returns></returns>
Task<ProtectedBranch> GetProtectedBranch(HostAddress address, string owner, string name, string branchName);
}
}