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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open missing TS issue automation #3664

Closed
2 tasks done
Eomm opened this issue Jan 27, 2022 · 9 comments
Closed
2 tasks done

Open missing TS issue automation #3664

Eomm opened this issue Jan 27, 2022 · 9 comments
Labels
feature request New feature to be added good first issue Good for newcomers

Comments

@Eomm
Copy link
Member

Eomm commented Jan 27, 2022

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

馃殌 Feature Proposal

It would be nice to add automation that opens a new issue when a PR is labelled as missing-types.

Motivation

Adding TS to a PR is not mandatory, but we should track the things that are missing.

In this way, the TS community may help us to keep the types in sync within the Node.js interface.

Example

  • a maintainer add a missing-types label to a PR
  • the automation creates a new issue tagged: good-first-issue, typescript
@Eomm Eomm added the feature request New feature to be added label Jan 27, 2022
@RafaelGSS RafaelGSS added the good first issue Good for newcomers label Jan 27, 2022
@KiraPC
Copy link
Contributor

KiraPC commented Jan 28, 2022

Hello @Eomm

I've started to work on this but I have some question:

  • is it ok to reuse already existing action?
  • What the title and body of the issue should contains?

I did something like "Missing Typescript for PR ${{ github.event.pull_request.title }}", but no idea about the body.

@Eomm
Copy link
Member Author

Eomm commented Jan 28, 2022

is it ok to reuse already existing action?

Which one?

What the title and body of the issue should contains?

Maybe:

title: ts: add missing types to [${{ github.event.pull_request.title }}]
body:

PR #123 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)

@KiraPC
Copy link
Contributor

KiraPC commented Jan 28, 2022

@Eomm Ok for title and body, can be done.

Which one?

I tested this on my forked repo and worked well.

Or this could be another option, but I don't know if in the template markdown I can use github events as placeholder.

@Eomm
Copy link
Member Author

Eomm commented Jan 29, 2022

I would go for: https://github.com/octokit/request-action
It is more flexible

@KiraPC
Copy link
Contributor

KiraPC commented Jan 29, 2022

I tried this right now, make different tests, but this action has some problems.

First of all, the string parsing when you use colon fails, because returns [object object], there is an issue opened [HERE

Second, I was not able to figure out how to pass a list for the labels parameter, if I use a list in yaml github workflows validate the steps and reject because it does not expect a sequence at that level, if I use string octokit validate the field expecting a list. [Solved]

@Eomm
Copy link
Member Author

Eomm commented Jan 29, 2022

They did not try to encode it:

title: ts%3A add missing types to [${{ github.event.pull_request.title }}]

Or, to use the format utility: https://docs.github.com/en/actions/learn-github-actions/expressions#format

It might work

@KiraPC
Copy link
Contributor

KiraPC commented Jan 29, 2022

I tried both, but neither using the encoded neither the format worked, you can check on my forked repo issues the title results.

We can change the title, maybe.

@Eomm
Copy link
Member Author

Eomm commented Jan 30, 2022

We can change the title, maybe.

Let's go for this as the first step.
Note that we need to remove the github.event.pull_request.title as well

@Fdawgs
Copy link
Member

Fdawgs commented Feb 22, 2022

@Eomm Would you say this is closed by #3668 now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature to be added good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants