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

UserTasks: add title per issue type #52435

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcoandredinis
Copy link
Contributor

This PR changes the API to return the issue type title.

This PR changes the API to return the issue type title.
@marcoandredinis marcoandredinis added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v17 labels Feb 24, 2025
Comment on lines +42 to +48
title := documentParts[0]
if !strings.HasPrefix(title, "# ") {
return "", ""
}
title = title[2:]

description := strings.TrimSpace(documentParts[1])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the title does not start with an "#", is it better to return nothing, or an empty title and shove the whole bs string into the description?

I'm worried that someone will make a typo/forget the # and this would lead to obscure user tasks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a test that iterates over all IssueTypes and ensures none of them returns an empty string for both title and description.
That should be enough to prevent such scenario

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v17 no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants