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

Feature: Add the ability to set the default category #1374

Closed
andrey-helldar opened this issue Dec 13, 2023 · 3 comments
Closed

Feature: Add the ability to set the default category #1374

andrey-helldar opened this issue Dec 13, 2023 · 3 comments

Comments

@andrey-helldar
Copy link

In order for a PR to be included in a category, it must be assigned a label.

In this case, the categories are displayed in the order in which they are defined in the configuration file.

But those PRs that do not fall into any of the categories will always be displayed above them. Thus, we will get something like this:

## Changed

- Something 1
- Something 2

## Added

- Something 3

## Fixed

- Something 4

## Removed

- Something 5

Let's say I want to change the location of a PR without labels between "Added" and "Fixed".

Now for this I need to add tags to all such PRs. But what if there are a lot of these PRs? This will become a tedious task.

Therefore, I propose to consider adding a new attribute for categories - default.

Thanks to it, we will be able to determine the order in which records are displayed ourselves. For example, like this:

categories:
  - title: 'Added'
    labels:
      - 'added'

  - title: 'Changed'
    default: true

  - title: 'Fixed'
    labels:
      - 'fix'
      - 'bug'

  - title: 'Removed'
    labels:
      - 'removed'

template: $CHANGES
## Added

- Something 3

## Changed

- Something 1
- Something 2

## Fixed

- Something 4
@jetersen
Copy link
Member

jetersen commented Dec 14, 2023

This is already possible simply by having a entry with title only, you can even control the placement of the default category :)

https://github.com/jenkinsci/.github/blob/47b68b30f98b9608f8dea2683ac54757002ff47b/.github/release-drafter.yml#L56

Feature was added in #1013

@andrey-helldar
Copy link
Author

@jetersen, wow! 😲

I tried to find information about this in the README file, including in the categories section, but couldn't find it.

I searched the entire file for occurrences of the words "sort" and "categor".

Thank you!

@jetersen
Copy link
Member

Admittedly it is missing from the docs 🫣

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

No branches or pull requests

2 participants