Revert "Automatically add label 'Z-Community-PR' to community PRs."
This reverts commit add82aca8d.
This commit is contained in:
parent
b8ded1f91a
commit
9f57cf1a68
1 changed files with 2 additions and 30 deletions
32
.github/workflows/pull_request.yml
vendored
32
.github/workflows/pull_request.yml
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
name: Pull Request
|
name: Prevent blocked
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [ opened, labeled, unlabeled ]
|
types: [opened, labeled, unlabeled]
|
||||||
jobs:
|
jobs:
|
||||||
prevent-blocked:
|
prevent-blocked:
|
||||||
name: Prevent blocked
|
name: Prevent blocked
|
||||||
|
|
@ -15,31 +15,3 @@ jobs:
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed("PR has been labeled with X-Blocked; it cannot be merged.");
|
core.setFailed("PR has been labeled with X-Blocked; it cannot be merged.");
|
||||||
|
|
||||||
community-prs:
|
|
||||||
name: Label Community PRs
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event.action == 'opened'
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- name: Check membership
|
|
||||||
if: github.event.pull_request.user.login != 'renovate[bot]'
|
|
||||||
uses: tspascoal/get-user-teams-membership@57e9f42acd78f4d0f496b3be4368fc5f62696662 # v3
|
|
||||||
id: teams
|
|
||||||
with:
|
|
||||||
username: ${{ github.event.pull_request.user.login }}
|
|
||||||
organization: element-hq
|
|
||||||
team: Core Team
|
|
||||||
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
|
||||||
- name: Add label
|
|
||||||
if: steps.teams.outputs.isTeamMember == 'false'
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
github.rest.issues.addLabels({
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
labels: ['Z-Community-PR']
|
|
||||||
});
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue