From 6d125e8094735f58ee93b2255ce719a45b97e32b Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 28 Apr 2024 14:15:46 +1000 Subject: [PATCH] auto-add issues triggered from main repo This is a sibling commit for https://github.com/bookwyrm-social/bookwyrm/pull/3363 These add a pair of GitHub Actions to create a new issue in the documentation repository when a PR with a `needs-docs` label is merged in the main repository. 1. In order to work, the related PR in the main repository will also need to be merged, as it triggers the job here, and the Bot set up as described in the PR in the main repository. --- .github/ACTION_ISSUE_TEMPLATE.md | 11 +++++++++++ .github/workflows/receive_docs_issues.yml | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .github/ACTION_ISSUE_TEMPLATE.md create mode 100644 .github/workflows/receive_docs_issues.yml diff --git a/.github/ACTION_ISSUE_TEMPLATE.md b/.github/ACTION_ISSUE_TEMPLATE.md new file mode 100644 index 00000000..f54f75e8 --- /dev/null +++ b/.github/ACTION_ISSUE_TEMPLATE.md @@ -0,0 +1,11 @@ +--- +title: Document PR {{ payload.client_payload.number }} - {{ payload.client_payload.title }} +--- + +Documentation is needed for changes made in https://github.com/bookwyrm-social/bookwyrm/pull/{{ payload.client_payload.number }} + +Pull Request notes are below. + +--- + +{{ payload.client_payload.body }} diff --git a/.github/workflows/receive_docs_issues.yml b/.github/workflows/receive_docs_issues.yml new file mode 100644 index 00000000..b7a63da3 --- /dev/null +++ b/.github/workflows/receive_docs_issues.yml @@ -0,0 +1,16 @@ +name: Repository Dispatch +on: + repository_dispatch: + types: [docs-needed] +jobs: + create-issue: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/checkout@v4 + - uses: JasonEtco/create-an-issue@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + filename: .github/ACTION_ISSUE_TEMPLATE.md