From 6cdf9c9b46ecd061ccfbf77b2841adb59a4b3831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 2 Nov 2026 10:33:46 +0100 Subject: [PATCH] Revert "ci: Add downstream/xxx label based on github org membership" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0475fad2ec7bb6285bdc0483be5fd30bddf556c3. When the downstream/* labels were added, the intent was for a "downstream/foo" label to mean "this PR is important for foo". Hence we had downstream/fedora, downstream/debian, …, a some time later downstream/amutable. But the PR job started adding that label to all PRs, even for cleanups and other things that are done by a person from the company, but might not be directly related to the downstream product that is being built. This dilutes the usefulness of the labels. Also, the config in the CI job was only added for downstream/amutable, so one company was more visible than others. If we filled this out for all companies and projects, many PRs would have a whole list of lables, since people can be affiliated with both a company and a distro, and some PRs are done by multiple people in cooperation. But we don't actually care about affiliations of authors that much. Let's just drop this. --- .github/workflows/labeler.yml | 42 ----------------------------------- 1 file changed, 42 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 0be65fe6ab7..90f2a8d2cc7 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -227,48 +227,6 @@ jobs: } } - - name: Label PR based on author's GitHub org membership - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 - if: startsWith(github.event_name, 'pull_request') && github.event.action != 'closed' - with: - script: | - const orgLabels = { - "amutable": "downstream/amutable", - }; - - const author = context.payload.pull_request.user.login; - - const labels = []; - for (const [org, label] of Object.entries(orgLabels)) { - /* The workflow token is not a member of these organizations, so - * GitHub only reveals public memberships to it. Members have to - * make their membership public to get the label. */ - try { - await github.rest.orgs.checkPublicMembershipForUser({ - org: org, - username: author, - }); - labels.push(label); - } catch (error) { - if (error.status !== 404) { - throw error; - } - } - } - - if (labels.length == 0) { - core.info(`${author} is not a public member of any listed organization`); - } else if (process.env.SELF_TEST == "true") { - core.info(`Would add ${labels.join(", ")}`); - } else { - await github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: labels, - }); - } - - name: Add please-review label on command in issue comment uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 if: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/please-review')