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

add missing types workflow #3668

Merged
merged 2 commits into from
Jan 31, 2022
Merged
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
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this just be a major version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, didn't got your question. Do you mean if it can use another version of the action?

Copy link
Member

@Fdawgs Fdawgs Jan 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, poor question there! Can it be a major tag i.e. octokit/request-action@v2 as opposed to using both a major and minor tag (v2.x)?

Copy link
Contributor Author

@KiraPC KiraPC Jan 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha.

I'll check and in case replace it in next commit.

EDIT: No, It can't be used with just the major.

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 }}