edx / edx-arch-experiments

A plugin to include applications under development by the architecture team at edx
GNU Affero General Public License v3.0
0 stars 3 forks source link

Remove community-engineering CODEOWNERS files in owned repos #132

Closed timmc-edx closed 1 year ago

timmc-edx commented 1 year ago

The relevant CODEOWNERS files are all identical with contents * @edx/community-engineering:

$ sha256sum `ack community-engineering ~/mirrored-orgs/{edx,openedx}/*/.github/CODEOWNERS -l` | cut -d ' ' -f1 | uniq -c
     44 b49129dd0e32a677549adfae1c5d19c2cc8dbe9b865f91f23bba2208d1b54f50

These can all be entirely removed, since this team doesn't exist any more.

timmc-edx commented 1 year ago
$ ack community-engineering {edx,openedx}/*/.github/CODEOWNERS -l | sed 's|/\.github/CODEOWNERS$||'
edx/acclaimbadge-xblock
edx/docs.edx.org
edx/frontend-app-communications
openedx/AnimationXBlock
openedx/AudioXBlock
openedx/ConceptXBlock
openedx/DoneXBlock
openedx/RecommenderXBlock
openedx/acid-block
openedx/api-doc-tools
openedx/build-test-release-wg
openedx/ccx-keys
openedx/community-wg
openedx/crowdsourcehinter
openedx/edx-bootstrap
openedx/edx-developer-docs
openedx/edx-documentation
openedx/edx-sphinx-theme
openedx/eslint-config
openedx/frontend-app-learner-record
openedx/frontend-platform
openedx/mdrst
openedx/onboarding-course-introduction
openedx/openedx-census
openedx/openedx-conference-pages
openedx/openedx-conference-website
openedx/openedx-i18n
openedx/openedx-slack-invite
openedx/openedxstats
openedx/pr_watcher_configuration
openedx/pr_watcher_notifier
openedx/repo-tools-data-schema
openedx/sample-themes
openedx/schoolyourself-xblock
openedx/stylelint-config-edx
openedx/webhook-test-repo
openedx/xblock-drag-and-drop-v2
openedx/xblock-free-text-response
openedx/xblock-image-modal
openedx/xblock-in-video-quiz
openedx/xblock-lti-consumer
openedx/xblock-qualtrics-survey
openedx/xblock-sql-grader
openedx/xblock-submit-and-compare
timmc-edx commented 1 year ago

I scripted creation of PRs with this, although I had to stop and run the gh pr create command directly a number of times since it doesn't have an auto-forking option:

#!/usr/bin/env bash
# Remove CE CODEOWNERS file.
#
# Setup: Install "gh" CLI tool.
# Run: cat openedx.lst | GH_TOKEN=`pass show ...` ./prs.sh
set -eu -o pipefail

while IFS= read -r reponame; do
    echo "Working on $reponame"
    git clone --quiet "https://github.com/openedx/$reponame" "clones/$reponame"
    pushd "clones/$reponame"
    [ "$(cat .github/CODEOWNERS)" = $'* @edx/community-engineering' ] || {
        echo "Unexpected CODEOWNER file contents"
        exit 1
    }
    git checkout -b timmc/rm-ce-co
    git rm .github/CODEOWNERS
    git commit -m $'build: Remove community-engineering CODEOWNERS\n\nTeam no longer exists. See <https://github.com/edx/edx-arch-experiments/issues/132>.'
    git push
    pr_url="$(gh pr create --fill)"
    popd
    echo "$pr_url" >> prs.txt
    sleep 3.0
done