Skip to content

Commit

Permalink
fix(branch_protections.py): Sort Required Status Checks (#38)
Browse files Browse the repository at this point in the history
Prevents false listing of differences when only order is different
  • Loading branch information
shiro authored May 25, 2023
1 parent ca50c71 commit 4d4c44f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions repo_manager/github/branch_protections.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ def check_repo_branch_protections(
this_protection.required_status_checks.strict,
)
)
# Without sorting, they sometimes get flagged as different just due to the ordinality of them
if (config_bp.protection.required_status_checks.checks is not None):
config_bp.protection.required_status_checks.checks.sort()
if (this_protection.required_status_checks.contexts is not None):
this_protection.required_status_checks.contexts.sort()
diffs.append(
diff_option(
"required_status_checks::checks",
Expand Down

0 comments on commit 4d4c44f

Please sign in to comment.