• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

samsmithnz / RepoAutomation / 3851196580

pending completion
3851196580

push

github

GitHub
Merge pull request #210 from samsmithnz/ConvertedPercentsToWholeNumber

314 of 450 branches covered (69.78%)

Branch coverage included in aggregate %.

767 of 866 relevant lines covered (88.57%)

7.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.65
/src/RepoAutomation.Core/Models/BranchProtectionPolicy.cs
1
namespace RepoAutomation.Core.Models;
2

3
public class BranchProtectionPolicy : BaseModel
4
{
5
    public RequiredStatusCheck? required_status_checks { get; set; }
8✔
6
    public Enforce? enforce_admins { get; set; }
5✔
7
    public Enforce? required_conversation_resolution { get; set; }
5✔
8
    public RequiredPullRequestReviews? required_pull_request_reviews { get; set; }
4✔
9
    public bool? restrictions { get; set; }
×
10
}
11

12
//Different structure when updating in PUT
13
public class BranchProtectionPolicyPut : BaseModel
14
{
15
    public RequiredStatusCheckPut? required_status_checks { get; set; }
2✔
16
    public bool? enforce_admins { get; set; }
2✔
17
    public bool? required_conversation_resolution { get; set; }
2✔
18
    public RequiredPullRequestReviews? required_pull_request_reviews { get; set; }
2✔
19
    public bool? restrictions { get; set; }
2✔
20
    public bool required_linear_history { get; set; }
2✔
21
    public bool allow_force_pushes { get; set; }
2✔
22
    public bool allow_deletions { get; set; }
2✔
23
}
24

25
public class RequiredStatusCheck
26
{
27
    public bool? strict { get; set; }
3✔
28
    public string[]? contexts { get; set; }
4✔
29
    public Check[]? checks { get; set; }
6✔
30
}
31

32
public class RequiredStatusCheckPut
33
{
34
    public bool? strict { get; set; }
2✔
35
    //NOTE: Don't include contexts property, it's deprecated
36
    public Check[]? checks { get; set; }
2✔
37
}
38

39
public class RequiredPullRequestReviews
40
{
41
    public bool dismiss_stale_reviews { get; set; }
4✔
42
    public int required_approving_review_count { get; set; }
4✔
43
    public bool require_code_owner_reviews { get; set; }
4✔
44
}
45

46
public class Check
47
{
48
    public string? context { get; set; }
5✔
49
}
50

51
public class Enforce
52
{
53
    public bool enabled { get; set; }
6✔
54
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc