Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-create new issue in documentation repo when needs-docs label in PR #3363

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/trigger_docs_issue.yml
@@ -0,0 +1,30 @@
name: Repository Dispatch
on:
pull_request:
types: [closed]
jobs:
dispatch:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'needs-docs')
runs-on: ubuntu-latest
steps:
- name: authenticate
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@v3
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}

- name: dispatch
uses: peter-evans/repository-dispatch@v3
env:
DOCS_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
with:
token: ${{ env.DOCS_TOKEN }}
repository: bookwyrm-social/documentation
event-type: docs-needed
client-payload: |-
{
"title": "${{ github.event.pull_request.title }}",
"body": ${{ toJson(github.event.pull_request.body) }},
"number": "${{ github.event.number }}"
}