Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Technical prereqs for big org-wide label sync #60

Merged
merged 5 commits into from
May 19, 2023

Commits on May 11, 2023

  1. fix: handling empty git repo errors

    When handling an HTTP 409 for empty git repos, this:
    
        e.fp.read()
    
    was yielding an empty bytestring. This caused us to pass through the
    empty-repo handling code and crash with the HTTP 409.
    Instead, we just do this:
    
        str(e)
    
    and compare against that output, which is nearly as good.
    kdmccormick committed May 11, 2023
    Configuration menu
    Copy the full SHA
    5e94b8f View commit details
    Browse the repository at this point in the history

Commits on May 16, 2023

  1. feat: add --check option, improve output, improve docstring

    The --check/-c option allows the name of a check class to be passed
    in, case-insensitively:
    
        python -m migrate.repo_checks -c requiretriageteamaccess -c requireclacheck
    
    Additionally, we improve the output in a few ways:
    * bold the repo names
    * make skipped checks cyan to distinguish them from steps
    * print out checks that will be run at the beginning
    * print check class names instead of class repr's
    
    Finally, we add usage instructions to the module docstring.
    kdmccormick committed May 16, 2023
    Configuration menu
    Copy the full SHA
    85e9f5d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2d63e14 View commit details
    Browse the repository at this point in the history
  3. refactor: extract repo_checks labels out to YAML file

    We are preparing make the EnsureLabels checks the one-and-only
    authoritative place for org-level labels. As part of this, we're
    extracting the list of labels out of the Python script and into
    a YAML file.
    
    For repos that are already up-to-date with repo_checks, this change
    should be a no-op.
    
    Additionally, this cleans up the EnsureLabels code a bit so that it'll
    be easier to add label-description support in the next commit.
    
    Part of:
    https://openedx.atlassian.net/wiki/spaces/COMM/pages/3695214629/openedx+org-wide+labels#1.-Proposal%3A-Store-labels-in-one-central-place
    kdmccormick committed May 16, 2023
    Configuration menu
    Copy the full SHA
    ce58c8c View commit details
    Browse the repository at this point in the history
  4. feat: set label descriptions in repo_checks

    repo_checks currently normalizes label names and colors. With this
    commit, it will also normalize the label description.
    
    In interest of minimizing the effect of running the EnsureLabels check:
    For labels that generally have already-established descriptions, we use
    those. For labels that don't, we just use !!null for now, with the plan
    of adding descriptions in the near future.
    
    Part of:
    https://openedx.atlassian.net/wiki/spaces/COMM/pages/3695214629/openedx+org-wide+labels#2.-Proposal%3A-List-of-starter-labels
    kdmccormick committed May 16, 2023
    Configuration menu
    Copy the full SHA
    cab173e View commit details
    Browse the repository at this point in the history