Add paper F8FYKQP6 #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Add lab member | |
on: | |
issues: | |
types: [opened, edited] | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
jobs: | |
process-issue: | |
if: contains(github.event.issue.labels.*.name, 'members-bot') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Parse Issue | |
id: parse-issue | |
uses: GrantBirki/[email protected] | |
with: | |
body: ${{ github.event.issue.body }} | |
csv_to_list: false | |
- name: Create PR body with Fixes line | |
run: | | |
echo "Fixes #${{ github.event.issue.number }}" > /tmp/pr-body.md | |
echo "" >> /tmp/pr-body.md | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Add lab member | |
id: output-issue | |
run: echo ${{ toJson(steps.parse-issue.outputs.json) }} | deno run -A scripts/create-hidive-member.ts - >> /tmp/pr-body.md | |
- name: Extract content | |
id: extract-content | |
run: | | |
SLUG=$(echo ${{ toJson(steps.parse-issue.outputs.json) }} | jq -r .slug) | |
NAME=$(echo ${{ toJson(steps.parse-issue.outputs.json) }} | jq -r .name) | |
echo "slug=$SLUG" >> $GITHUB_OUTPUT | |
echo "name=$NAME" >> $GITHUB_OUTPUT | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
title: "members-bot: Add ${{ steps.extract-content.outputs.name }}" | |
commit-message: "members-bot: Add ${{ steps.extract-content.outputs.name }}" | |
branch: "news/${{ steps.extract-content.outputs.slug }}" | |
body-path: /tmp/pr-body.md | |
labels: members-bot |