Skip to content

Setup / sync meeting notes #127

Setup / sync meeting notes

Setup / sync meeting notes #127

Workflow file for this run

name: "Setup / sync meeting notes"
on:
workflow_dispatch:
inputs:
kind:
type: "choice"
description: "What kind of meeting?"
options:
- "core"
- "virtual-hackathon"
- "jupytergis-sync"
date:
description: |
Date of the meeting in `date --date` format, e.g.:
"today", "tomorrow", "next wednesday", "2025-02-05", etc.
See <https://www.gnu.org/software/coreutils/manual/html_node/Date-input-formats.html>
required: false
default: "today"
type: "string"
issue_comment: # TODO: Switch to issue comment?
types:
- "created"
- "edited"
# IMPORTANT: Enable 'Allow GitHub Actions to create and approve pull requests'
# in repo and organization Actions Settings.
permissions:
contents: "write"
pull-requests: "write"
jobs:
create:
name: "Create PR for meeting notes"
if: "github.event_name == 'workflow_dispatch'"
uses: "mfisher87/hackmd-meeting-notes-action/.github/workflows/create-meeting-notes-pr.yml@main"
with:
date: "${{ inputs.date }}"
template_path: ".github/meeting-notes-templates/${{ inputs.kind }}.md"
# TODO: Is this the HackMD path or the repo path??
output_path: "blog/%Y%m%d-${{ inputs.kind }}/index.md"
hackmd_team: "geojupyter"
branch_name: "%Y-%m-%d-${{ inputs.kind }}-meeting-notes"
force_push: true
pr_title: "Add ${{ inputs.kind }} meeting notes %Y-%m-%d"
pr_body: |
Meeting notes initialized at ${env.hackmd_doc_url}.
After the meeting, sync the notes from HackMD to this PR by commenting "/bot please sync notes"
secrets:
HACKMD_TOKEN: "${{ secrets.HACKMD_TOKEN }}"
sync-comment-trigger:
name: "React to the triggering comment"
if: "${{ github.event.issue.pull_request && contains(github.event.comment.body, '/bot please sync notes') }}"
runs-on: "ubuntu-latest"
steps:
- name: "React to the triggering comment"
run: |
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --raw-field 'content=+1'
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
sync:
name: "Sync notes from HackMD to PR"
needs:
- "sync-comment-trigger"
uses: "mfisher87/hackmd-meeting-notes-action/.github/workflows/sync-meeting-notes-pr.yml@main"
with:
pr_number: "${{ github.event.issue.number }}"
secrets:
HACKMD_TOKEN: "${{ secrets.HACKMD_TOKEN }}"