peaceiris / actions-label-commenter

Label Commenter Action: Label triggered GitHub Action for posting a template comment, and automatically open/close/lock/unlock issues, pull-requests, and discussions.
MIT License
84 stars 16 forks source link

proposal: Define config types and validate those #322

Open peaceiris opened 3 years ago

peaceiris commented 3 years ago

Is your feature request related to a problem? Please describe.

Validate config file at first.

Describe the solution you'd like

Libraries

Describe alternatives you've considered

Additional context

github-actions[bot] commented 3 years ago

Thank you @peaceiris for suggesting this.

Log | Bot Usage
Andre601 commented 3 years ago
export interface Labeled {
    issue: Issue;
    pr?:   Issue;
}

This wonders me... Would this make issue required? SInce it lacks the ? which to my basic ts knowledge makes it optional/nullable?

peaceiris commented 3 years ago

That is a simple example generated with yaml-to-typescript. In order to avoid misunderstandings, I have deleted that and added some useful libraries for validation.