binbashar / le-ref-architecture-doc

Binbash Leverage Reference Architecture documentation
https://leverage.binbash.co
MIT License
42 stars 20 forks source link

Enhancement | Add labels and format checkings for issues and PRs #133

Open juanmatias opened 2 years ago

juanmatias commented 2 years ago

Describe the Enhancement

Every Issue and PR needs to follow a specific format (in title and body) and contain labels (to be processed correctly). This Enhancement is aimed to check the formats and labels and accept/reject issues and PRs based on this.

Expected Behavior

If a given issue or PR does not follow the formats or does not contain the needed labels, it must be blocked (e.g. a PR that can not be approved) until the format is fixed and the labels added.

Use Case

The labels are used to trigger actions in the pipelines, so they need to be there. The formats for title and body allow an engineer or other readers to understand quickly what the issue or PR is about. (also a standardized format allows an operator to perform more specific searches through them, or eventually automate some kind of process)

Describe Ideal Solution

Add Github Actions checking this requirements.

Alternatives Considered

n/a

Additional Context

This is a check that should be implemented in other repositories, it will be documented here in order to be replicated easily.

References


Notes

Issue-helper action

Main URL: https://github.com/actions-cool/issues-helper/blob/main/README.en-US.md

Lock Issue based on labels: https://github.com/actions-cool/issues-helper/blob/main/README.en-US.md#lock-issue

Unlock: https://github.com/actions-cool/issues-helper/blob/main/README.en-US.md#unlock-issue

Check title and body formats: https://github.com/actions-cool/issues-helper/blob/main/README.en-US.md#check-issue

In this last keep in mind the following:

title-includes body-includes supports the format x1,x2 or x1,x2/y1,y2. Only supports two levels

Interesting example, if body does not contain x then do something: https://github.com/actions-cool/.github/blob/main/workflow-templates/issue-check-invalid.yml

PRs helper

Check Fill: https://github.com/actions-cool/pr-check-fill