mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #14398 from ethereum/fix-welcome-contributors
Remove token requirement from external contributor greeter
This commit is contained in:
commit
b583e9e64d
32
.github/workflows/welcome-external-pr.yml
vendored
32
.github/workflows/welcome-external-pr.yml
vendored
@ -6,42 +6,16 @@ on:
|
|||||||
- opened
|
- opened
|
||||||
|
|
||||||
env:
|
env:
|
||||||
ORGANIZATION: Ethereum
|
|
||||||
DRY_RUN: false
|
DRY_RUN: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
comment-external-pr:
|
comment-external-pr:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Get organization members
|
# Note: this step requires that the INTERNAL_CONTRIBUTORS environment variable
|
||||||
id: get_members
|
# is already defined in the repository with the current json list of internal contributors.
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.READ_ORG }}
|
|
||||||
CONTRIBUTOR: ${{ github.event.pull_request.user.login }}
|
|
||||||
run: |
|
|
||||||
gh api graphql \
|
|
||||||
--raw-field organization="$ORGANIZATION" \
|
|
||||||
--raw-field query='
|
|
||||||
query($organization: String!) {
|
|
||||||
organization(login: $organization) {
|
|
||||||
team(slug: "Solidity") {
|
|
||||||
members(first: 100) {
|
|
||||||
nodes {
|
|
||||||
login
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}' > org_members.json
|
|
||||||
echo "CONTRIBUTOR_IS_ORG_MEMBER=$(
|
|
||||||
jq \
|
|
||||||
--arg contributor $CONTRIBUTOR \
|
|
||||||
'.data.organization.team.members | any(.nodes[].login; . == $contributor)' \
|
|
||||||
org_members.json
|
|
||||||
)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Comment on external contribution PR
|
- name: Comment on external contribution PR
|
||||||
if: ${{ steps.get_members.outputs.CONTRIBUTOR_IS_ORG_MEMBER == 'false' }}
|
if: "!contains(fromJSON(vars.INTERNAL_CONTRIBUTORS), github.event.pull_request.user.login)"
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PR: ${{ github.event.pull_request.html_url }}
|
PR: ${{ github.event.pull_request.html_url }}
|
||||||
|
Loading…
Reference in New Issue
Block a user