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

flag unlabeled PRs with wildcard label #134

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NathanPJF
Copy link

Fixes #74

馃憢 Hi there,
I'm working on a project with a distributed team and we were looking for a way to generate changelogs/releases easier. The challenge we ran up against is essentially the problem identified in #74.

To address this, I made a change to identify any commits that didn't have a label from the config with a "wildcard label" (name taken from the linked issue). I have details on how it works in the README.md. I wanted to share my approach to see if it is something you feel is useful before I go forward with writing test and whatnot 馃槂

Result

Example from my testing:

  "changelog": {
    "labels": {
      "breaking change": "馃挜 Breaking Change",
      "enhancement": "馃殌 Enhancement",
      "bug fix": "馃悰 Bug fixes",
      "unlabeled": "馃 Unlabeled"
    },
    "wildcardLabel": "unlabeled",
    "cacheDir": ".changelog"
  }
## Unreleased (2019-05-04)

#### 馃殌 Enhancement
* [#838](https://github.com/foo/bar/pull/838) Update search results layout ([@NathanPJF](https://github.com/nathanpjf))

#### 馃 Unlabeled
* [#903](https://github.com/foo/bar/pull/903) Unhide mute button ([@somePerson](https://github.com/somePerson))
* [#923](https://github.com/foo/bar/pull/923) Convert hardcoded values ([@somePerson](https://github.com/somePerson))

Approach

I have details on my thought process in my fork, but essentially I felt the following was a good workflow:

  1. wildcardLabel is optional and by default it has no value.
  2. When there is a value, a default changelog heading is provided. Figured a default heading was fine as the tool already provides a number of defaults.
  3. If you want a custom heading, you need to write the same label in the configuration labels along with a heading.

^ At first writing it in labels felt like duplication of effort. However, I realized the value for wildcardLabel could match a real label being used on GitHub to act as a safeguard for workflows where people are identifying PRs that need labeling. e.g. You have a typical workflow to label things on GitHub with unlabeled or for triage until you know whether the change is going to be a breaking one. Incase that PR never gets "properly labeled" before merging, you'd want a warning in place before you make that next release.

@rwjblue
Copy link
Contributor

rwjblue commented Sep 24, 2019

This seems neat to me, would definitely be useful in some projects I work in.

@Exelord
Copy link

Exelord commented Dec 16, 2019

This is awesome! Exactly what I was missing.

@shrkw
Copy link

shrkw commented Mar 24, 2021

I love this PR 鉂わ笍

@mansona
Copy link

mansona commented Nov 27, 2023

Hey 馃憢 has there been any movement on this PR? I'm particularly interested in it because I'm working on something that makes use of these changes and I would love an official release 馃檹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support a wildcard/"other" label
6 participants