Skip to content

Commit

Permalink
add missing types workflow (#3668)
Browse files Browse the repository at this point in the history
* add missing types workflow

* use the closed events to avoid opening issue for unmerged PR
  • Loading branch information
KiraPC committed Jan 31, 2022
1 parent b15c7c5 commit 17a4875
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/missing_types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Missing Types

on:
pull_request:
types: [closed]

jobs:
create_issue:
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged &&
contains(github.event.pull_request.labels.*.name, 'missing-types')
steps:
- name: Create an issue
uses: octokit/request-action@v2.x
with:
route: POST /repos/{owner}/{repo}/issues
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
title: add missing types to [${{ github.event.pull_request.title }}]
body: |
PR [${{ github.event.pull_request.number }}](${{ github.event.pull_request.html_url }}) has introduced a new feature that requires updating Fastify's typings and tests.
Learn how to [contribute](https://github.com/fastify/fastify/blob/main/CONTRIBUTING.md)
Get inspired by [this example PR](https://github.com/fastify/fastify/pull/3231)
labels: |
["good-first-issue", "typescript"]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 17a4875

Please sign in to comment.