Skip to content

[Join] Org Members | 加入社区成员 - @JonXia #277

[Join] Org Members | 加入社区成员 - @JonXia

[Join] Org Members | 加入社区成员 - @JonXia #277

Workflow file for this run

name: Join org automation
on:
issues:
types: [opened]
issue_comment:
types: [created]
permissions:
issues: write
contents: read
jobs:
join:
if: |
contains(github.event.issue.labels.*.name, 'join-request') && (
(github.event_name == 'issues' && github.event.action == 'opened') ||
(github.event_name == 'issue_comment' &&
github.event.comment.user.type != 'Bot' &&
(contains(github.event.comment.body, '/approve')))
)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create GitHub App installation token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: mcpp-community
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Run handler
env:
ORG: mcpp-community
GH_TOKEN: ${{ steps.app-token.outputs.token }}
REPO: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
EVENT_ACTION: ${{ github.event.action }}
EVENT_NAME: ${{ github.event_name }}
LABEL_NAME: ${{ github.event.label.name }}
COMMENT_BODY: ${{ github.event.comment.body }}
ACTOR: ${{ github.actor }}
run: python .github/scripts/join_org.py