Skip to content

Commit

Permalink
Merge pull request #403 from openedx/feanil/fix_cla_check
Browse files Browse the repository at this point in the history
feanil/fix cla check
  • Loading branch information
Feanil Patel authored Jun 21, 2023
2 parents 98db71f + 03186dc commit 54ca13c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions edx_repo_tools/repo_checks/repo_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
import click
import requests
import yaml

# Pylint doesn't believe that fastcore.net exports these error classes...
# pylint: disable=no-name-in-module
from fastcore.net import (
HTTP4xxClientError,
HTTP404NotFoundError,
HTTP409ConflictError,
)

# pylint: enable=no-name-in-module
from ghapi.all import GhApi, paged

Expand Down Expand Up @@ -413,6 +415,7 @@ class EnsureLabels(Check):
"""
All repos in the org should have certain labels.
"""

# Load up the labels file in the class definition so that we fail
# fast if the file isn't valid YAML.
# Each item should be a dict with the fields:
Expand Down Expand Up @@ -814,7 +817,9 @@ def _update_branch_protection(self, params):
"https://api.github.com"
+ self.api.repos.update_branch_protection.path.format(**params)
)
resp = requests.put(url, headers=headers, json=params) # pylint: disable=missing-timeout
resp = requests.put(
url, headers=headers, json=params
) # pylint: disable=missing-timeout

resp.raise_for_status()

Expand Down Expand Up @@ -849,15 +854,9 @@ def _get_update_params_from_get_branch_protection(self):
required_pr_reviews = None
if "required_pull_request_reviews" in protection:
required_pr_reviews = {
"dismiss_stale_reviews": (
protection.required_pull_request_reviews.dismiss_stale_reviews,
),
"require_code_owner_reviews": (
protection.required_pull_request_reviews.require_code_owner_reviews,
),
"required_approving_review_count": (
protection.required_pull_request_reviews.required_approving_review_count,
),
"dismiss_stale_reviews": protection.required_pull_request_reviews.dismiss_stale_reviews,
"require_code_owner_reviews": protection.required_pull_request_reviews.require_code_owner_reviews,
"required_approving_review_count": protection.required_pull_request_reviews.required_approving_review_count,
}

restrictions = None
Expand Down

0 comments on commit 54ca13c

Please sign in to comment.