mirror of
https://github.com/zed-industries/zed.git
synced 2026-08-24 00:16:18 +00:00
64 lines
2.1 KiB
YAML
64 lines
2.1 KiB
YAML
# When a guild member opens a PR, react on the Guild board (#74):
|
|
# - if the PR will close an open board issue, set that issue to In Progress
|
|
# (covers starting work without self-assigning), and
|
|
# - if they already have another open PR opened since the cohort started, post
|
|
# a gentle heads-up to #zed-guild-internal.
|
|
|
|
name: Guild New PR Notification
|
|
|
|
on:
|
|
# zizmor: ignore[dangerous-triggers]
|
|
# Fork PRs must be supported, but this workflow only reads event metadata and
|
|
# checks out scripts from the trusted default branch; it never executes PR code.
|
|
pull_request_target:
|
|
types: [opened]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: guild-new-pr-notify-${{ github.event.pull_request.number }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
react:
|
|
if: github.repository == 'zed-industries/zed'
|
|
runs-on: namespace-profile-2x4-ubuntu-2404
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
- name: Generate app token
|
|
id: app-token
|
|
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
|
|
with:
|
|
app-id: ${{ secrets.ZED_COMMUNITY_BOT_APP_ID }}
|
|
private-key: ${{ secrets.ZED_COMMUNITY_BOT_PRIVATE_KEY }}
|
|
owner: zed-industries
|
|
repositories: zed
|
|
permission-issues: write
|
|
permission-members: read
|
|
permission-organization-projects: write
|
|
permission-pull-requests: read
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
|
|
with:
|
|
sparse-checkout: |
|
|
script/github-guild-board.py
|
|
sparse-checkout-cone-mode: false
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install dependencies
|
|
run: pip install requests
|
|
|
|
- name: React to the new PR
|
|
env:
|
|
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
PROJECT_NUMBER: "74"
|
|
GUILD_MODE: event
|
|
SLACK_WEBHOOK_GUILD_INTERNAL: ${{ secrets.SLACK_WEBHOOK_GUILD_INTERNAL }}
|
|
run: python script/github-guild-board.py
|