evcc-io/.github/workflows/docs-issue.yml
2024-04-03 00:06:46 +02:00

25 lines
743 B
YAML

name: Create Documentation Issue
on:
pull_request:
types: [labeled]
jobs:
check-label-and-create-issue:
runs-on: ubuntu-latest
if: github.event.label.name == 'needs documentation'
steps:
- name: Create Docs Issue
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const title = `Document: ${context.payload.pull_request.title}`;
const body = `We need to document the new feature introduced in this PR: ${context.payload.pull_request.html_url}`;
await github.rest.issues.create({
owner: 'evcc-io',
repo: 'docs',
title: title,
body: body
});