From 7b52016ebea2e8147efe2265aeee177c1a4c6eaa Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Wed, 16 Sep 2020 09:39:24 -0700 Subject: [PATCH] Replace CODEOWNERS with CODENOTIFY (#13838) --- .github/CODEOWNERS | 270 +------------------------------ .github/workflows/codenotify.yml | 14 ++ CODENOTIFY | 4 + dev/check/all.sh | 1 - dev/check/check-owners.sh | 15 -- dev/owners.sh | 12 -- 6 files changed, 22 insertions(+), 294 deletions(-) create mode 100644 .github/workflows/codenotify.yml create mode 100644 CODENOTIFY delete mode 100755 dev/check/check-owners.sh delete mode 100755 dev/owners.sh diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a6d7d596d1f..a0b7281d5de 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,269 +5,7 @@ # Order is important; the last matching pattern takes the most # precedence. -# The "nobody" team is an alerting mechanism that indicates when there are files in a PR that are -# not owned by anyone. This is a signal to the PR author that certain modified files are unowned and -# they need to (1) track down the owners using git blame and (2) update CODEOWNERS. -* @sourcegraph/nobody - -# Top-level catch-alls (these are weaker confidence and might need to be reassigned at some point) -*.js @sourcegraph/web -*.ts @sourcegraph/web -*.tsx @sourcegraph/web -/cmd @slimsag -/internal @slimsag -/enterprise/cmd/frontend @slimsag -/enterprise/cmd/server @slimsag -/cmd/frontend/shared @slimsag -/cmd/frontend/backend @slimsag -/cmd/frontend/internal/app/assets @slimsag -/cmd/frontend/internal/app/templates @slimsag -/cmd/frontend/internal/app/*.go @slimsag -/cmd/frontend/internal/app/assetsutil @slimsag -/cmd/frontend/internal/app/ui @slimsag -/cmd/frontend/internal/app/pkg @slimsag -/cmd/frontend/internal/app/router @slimsag -/cmd/frontend/internal/app/errorutil @slimsag -/cmd/frontend/internal/goroutine @slimsag @efritz -/cmd/frontend/internal/inventory @slimsag -/cmd/frontend/internal/cli/middleware @beyang @slimsag -/cmd/frontend/internal/cli @slimsag -/cmd/frontend/internal/pkg/markdown @slimsag -/cmd/frontend/internal/pkg/handlerutil @slimsag -/cmd/frontend/internal/httpapi @slimsag -/cmd/frontend/types @slimsag -/cmd/frontend/hooks @slimsag -/internal/cmd/ghe-feeder @uwedeportivo -/internal/comby @rvantonder -/internal/db/ @keegancsmith -/internal/processrestart @slimsag @keegancsmith -/internal/honey @keegancsmith -/internal/registry @sourcegraph/web -/internal/slack @slimsag -/internal/txemail @slimsag -/internal/src-cli @efritz -/internal/linkheader @efritz -/internal/sqliteutil @efritz -/internal/workerutil @efritz -/internal/tar @efritz -/renovate.json @felixfbecker -/.stylelintrc.json @felixfbecker -/.stylelintignore @felixfbecker -/graphql-schema-linter.config.js @felixfbecker -/.prettierignore @felixfbecker -/.github @beyang -/.github/workflows/lsif.yml @efritz -/.github/workflows/codeql.yml @sourcegraph/security -/.gitmodules @beyang -/.gitattributes @beyang -/.yarnrc @felixfbecker -.eslintrc.js @felixfbecker -/internal/buildkite @ggilmore -/internal/httpcli @sourcegraph/cloud -/dev/release-ping.sh @sourcegraph/distribution -/dev/grafana.sh @sourcegraph/distribution -/dev/grafana @sourcegraph/distribution -/dev/prometheus.sh @sourcegraph/distribution -/dev/prometheus @sourcegraph/distribution -/dev/zoekt @sourcegraph/cloud -/dev/src-expose @keegancsmith -/dev/drop-test-databases.sh @efritz -/dev/squash_migrations.sh @efritz -/dev/watchmanwrapper @keegancsmith -/.storybook @felixfbecker -/CONTRIBUTING.md @beyang @nicksnyder @slimsag -/SECURITY.md @sourcegraph/security -/.mailmap @beyang -/tsconfig.json @sourcegraph/web -/.mocharc.json @sourcegraph/web -.eslintrc.* @sourcegraph/web -/prettier.config.js @sourcegraph/web -/.editorconfig @sourcegraph/web -/jest.config.js @sourcegraph/web - -# Web -/shared @sourcegraph/web -/web @sourcegraph/web -/ui @sourcegraph/web -/client @sourcegraph/web -/enterprise/ui @sourcegraph/web -/cmd/frontend/internal/app/jscontext @sourcegraph/web @slimsag -/packages/@sourcegraph @sourcegraph/web -/shared/src/components/activation/ @sourcegraph/web - -# Tracking -/cmd/frontend/internal/app/pkg/updatecheck/ @dadlerj -/web/src/tracking/ @dadlerj -**/tracking @dadlerj -/cmd/frontend/internal/usagestats @dadlerj -/cmd/frontend/internal/pkg/usagestatsdeprecated @dadlerj -/internal/eventlogger @dadlerj - -# Auth -/cmd/frontend/auth/ @beyang @unknwon -/cmd/frontend/internal/auth/ @beyang @unknwon -/cmd/frontend/internal/session/ @beyang @unknwon -/cmd/frontend/external/session/ @beyang @unknwon -/enterprise/cmd/frontend/auth @beyang @unknwon -/enterprise/dev/auth-provider @beyang @unknwon -/cmd/frontend/graphqlbackend/*session* @beyang @unknwon -/cmd/frontend/graphqlbackend/*auth* @beyang @unknwon -/cmd/frontend/graphqlbackend/access_token.go @beyang @unknwon -/internal/actor/ @beyang @unknwon - -# Cloud -/internal/authz/ @sourcegraph/cloud -/cmd/frontend/globals/ @sourcegraph/cloud @slimsag -/cmd/frontend/internal/bg/ @sourcegraph/cloud @slimsag -/cmd/github-proxy/ @sourcegraph/cloud -/cmd/gitserver/ @sourcegraph/cloud -/cmd/repo-updater/ @sourcegraph/cloud -/enterprise/cmd/frontend/authz/ @sourcegraph/cloud -/enterprise/internal/authz/ @sourcegraph/cloud -/enterprise/internal/db/ @sourcegraph/cloud -/enterprise/cmd/frontend/internal/authz/ @sourcegraph/cloud -/enterprise/cmd/repo-updater/ @sourcegraph/cloud -/internal/extsvc/ @sourcegraph/cloud -/internal/gitserver/ @sourcegraph/cloud -/internal/jsonc/ @sourcegraph/cloud @tsenart @slimsag -/internal/repoupdater/ @sourcegraph/cloud -/internal/trace/ @sourcegraph/cloud -/internal/tracer/ @sourcegraph/cloud -/internal/vcs/ @sourcegraph/cloud - -# Backend integration tests -/dev/gqltest/ @unknwon -/internal/gqltestutil/ @unknwon - -# Campaigns -/cmd/frontend/graphqlbackend/campaigns.go @sourcegraph/campaigns -/doc/user/campaigns @sourcegraph/campaigns -/enterprise/internal/campaigns @sourcegraph/campaigns -/enterprise/cmd/frontend/internal/campaigns @sourcegraph/campaigns -/internal/campaigns @sourcegraph/campaigns -/web/**/campaigns/** @sourcegraph/campaigns -/web/src/integration/campaigns.test.ts @sourcegraph/campaigns - -# Search -*/search/**/* @sourcegraph/search -/cmd/frontend/internal/pkg/search @sourcegraph/search -/cmd/frontend/graphqlbackend/*search* @sourcegraph/search -/cmd/frontend/graphqlbackend/*zoekt* @sourcegraph/search -/cmd/query-runner/ @sourcegraph/search -/cmd/searcher/ @sourcegraph/search -/cmd/symbols/ @sourcegraph/search -/internal/search/ @sourcegraph/search -/internal/symbols/ @sourcegraph/search - -# Symbols -/cmd/frontend/graphqlbackend/*symbols* @sourcegraph/code-intel -/enterprise/cmd/frontend/internal/symbols @sourcegraph/code-intel -/cmd/symbols/.ctags.d/ @sourcegraph/code-intel -/cmd/symbols/internal/pkg/ctags/ @sourcegraph/code-intel -/shared/src/languages* @sourcegraph/code-intel - -# Saved searches -/web/src/SavedQuery.tsx @attfarhan -/web/src/SavedQueries.tsx @attfarhan -/web/src/SavedQueryCreateForm.tsx @attfarhan -/web/src/SavedQueryUpdateForm.tsx @attfarhan -/web/src/SavedQueryForm.tsx @attfarhan -/web/src/SavedQueryRow.tsx @attfarhan -/cmd/frontend/types/saved_searches.go @attfarhan - -# Distribution -/dev/ci @sourcegraph/distribution -/enterprise/dev/ci @sourcegraph/distribution -## Deployment -Dockerfile @sourcegraph/distribution -/monitoring @slimsag @sourcegraph/distribution -/docker-images @sourcegraph/distribution -/enterprise/docs/deployment.md @sourcegraph/distribution -**/build.sh @sourcegraph/distribution -/cmd/frontend/envvar @sourcegraph/distribution -/cmd/frontend/graphqlbackend/site_monitoring* @sourcegraph/distribution -/cmd/server @sourcegraph/distribution -/internal/conf @slimsag -/internal/db/confdb @slimsag -/internal/db/globalstatedb @slimsag -/internal/prometheusutil @sourcegraph/distribution -/internal/cmd/resources-report @sourcegraph/distribution -/.github/workflows/resources-report.yml @sourcegraph/distribution -/enterprise/docs @sourcegraph/distribution -/.buildkite @sourcegraph/distribution @ggilmore -## Regression testing -/web/src/regression @uwedeportivo @beyang - -# Licensing and billing -/enterprise/cmd/frontend/internal/dotcom @sourcegraph/distribution -/enterprise/cmd/frontend/internal/licensing @sourcegraph/distribution - -# Documentation and homepage -/README.md @sqs -/doc/ @sourcegraph/distribution -/doc/dev/ @nicksnyder -/doc/dev/web/ @felixfbecker @sourcegraph/web -/doc/dev/codeintel/ @efritz @sourcegraph/code-intel - -# Browser extensions -/browser/ @sourcegraph/web - -# Extension API -/packages/sourcegraph-extension-api/ @sourcegraph/web -/packages/@sourcegraph/extension-api-types @sourcegraph/web -/cmd/frontend/registry @sourcegraph/web -/enterprise/cmd/frontend/internal/registry @sourcegraph/web - -# Backend shared packages -/internal/endpoint/ @keegancsmith @slimsag -/internal/rcache/ @keegancsmith -/internal/leader @sourcegraph/cloud -/internal/redispool/ @keegancsmith -/internal/store/ @keegancsmith -/internal/metrics @keegancsmith @slimsag -/internal/logging @keegancsmith @slimsag -/internal/observation @keegancsmith @slimsag - -# Precise code intel -/enterprise/cmd/precise-code-intel-bundle-manager/ @sourcegraph/code-intel -/enterprise/cmd/precise-code-intel-worker/ @sourcegraph/code-intel -/enterprise/cmd/precise-code-intel-indexer/ @sourcegraph/code-intel -/enterprise/cmd/precise-code-intel-indexer-vm/ @sourcegraph/code-intel -/enterprise/internal/codeintel @sourcegraph/code-intel -/enterprise/cmd/frontend/internal/codeintel @sourcegraph/code-intel -/cmd/frontend/graphqlbackend/codeintel.go @sourcegraph/code-intel -/internal/cmd/precise-code-intel-tester @sourcegraph/code-intel - -# Development -/dev/repogen @sourcegraph/cloud -/.vscode @felixfbecker -/.graphqlconfig @felixfbecker - -# Misc and special overrides -/LICENSE* @sqs @beyang @slimsag -/enterprise/internal/license @beyang -/babel.config.js @felixfbecker -/internal/hubspot/ @dadlerj -/internal/highlight/ @slimsag -/dev/codecov.yml @nicksnyder @tsenart @lguychard @beyang -/.github/ISSUE_TEMPLATE/security.md @sourcegraph/security - -# Third party license list -/third-party-licenses/ThirdPartyLicenses.csv @sourcegraph/cloud @sourcegraph/web -/third-party-licenses/ThirdPartyDistributedTools.csv @sourcegraph/distribution -/.github/workflows/licenses* @sourcegraph/distribution -/dev/licenses.sh @sourcegraph/distribution - -# Changes to the GraphQL API should be approved by both the team owning the backend and the consumers -/cmd/frontend/graphqlbackend/schema.graphql @sourcegraph/web - -# These are configured through Renovate config. -# See ../renovate.json and https://github.com/sourcegraph/renovate-config/blob/master/renovate.json -# This is so that automerged PRs do not trigger email notification spam. -**/package.json -**/yarn.lock - -/CHANGELOG.md - -/.tool-versions @sourcegraph/distribution -/.nvmrc @sourcegraph/web +# We are experimenting with not using CODEOWNERS until the end of October. +# More context: https://github.com/sourcegraph/sourcegraph/pull/13838 +CODEOWNERS @nicksnyder +.github/CODEOWNERS @nicksnyder diff --git a/.github/workflows/codenotify.yml b/.github/workflows/codenotify.yml new file mode 100644 index 00000000000..cb86c35700b --- /dev/null +++ b/.github/workflows/codenotify.yml @@ -0,0 +1,14 @@ +name: codenotify +on: [pull_request] + +jobs: + codenotify: + runs-on: ubuntu-latest + name: codenotify + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: sourcegraph/codenotify@v0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CODENOTIFY b/CODENOTIFY new file mode 100644 index 00000000000..9bcecb2a072 --- /dev/null +++ b/CODENOTIFY @@ -0,0 +1,4 @@ +# See https://github.com/sourcegraph/codenotify for documentation. + +**/CODENOTIFY @nicksnyder +**/CODEOWNERS @nicksnyder diff --git a/dev/check/all.sh b/dev/check/all.sh index dde9a012edf..48649b86331 100755 --- a/dev/check/all.sh +++ b/dev/check/all.sh @@ -22,7 +22,6 @@ CHECKS=( ./no-alpine-guard.sh ./no-localhost-guard.sh ./bash-syntax.sh - ./check-owners.sh ./shfmt.sh ./shellcheck.sh ) diff --git a/dev/check/check-owners.sh b/dev/check/check-owners.sh deleted file mode 100755 index 3bfc6d349c6..00000000000 --- a/dev/check/check-owners.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo "--- check codeowners" - -cd "$(dirname "${BASH_SOURCE[0]}")/../.." - -OWNERS_OUT="$(./dev/owners.sh)" - -if [ -n "$OWNERS_OUT" ]; then - echo "$OWNERS_OUT" - echo "FAILED check: ./dev/owners.sh returned non-empty, indicating there are files without an owner." 1>&2 - exit 1 -fi diff --git a/dev/owners.sh b/dev/owners.sh deleted file mode 100755 index f2fab820b09..00000000000 --- a/dev/owners.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cd "$(dirname "${BASH_SOURCE[0]}")/.." - -# setup additional gitignore source -awk -F " +@" '{ print $1 }' <.github/CODEOWNERS >/tmp/ignore - -set +e -find . -path ./.git -prune -o -print | git -c core.excludesfile=/tmp/ignore check-ignore --verbose --no-index -n --stdin | grep '^::\s' | grep -v '^::\s\.$' -set -e