Skip to content

Conversation

rimi-itk
Copy link
Collaborator

@rimi-itk rimi-itk commented Nov 5, 2024

We don't use the same pull request entry format in our changelogs across projects. This adds a “changelog format detector” that can help detect the format used in a project. Currently, three formats observed in the wild are supported:

  1. Exhibit 1 (e.g. https://github.com/itk-dev/ai-screening/blob/develop/CHANGELOG.md):

     - [PR-87](https://example.com/pr/87)
       Test
    
  2. Exhibit 2 (e.g. https://github.com/itk-dev/devops_itksites/blob/develop/CHANGELOG.md):

     - [#87](https://example.com/pr/87)
       Test
    
  3. Exhibit 3 (e.g. https://github.com/itk-dev/hoeringsportal/blob/develop/CHANGELOG.md):

     * [PR-87](https://example.com/pr/87)
       Test
    

@rimi-itk rimi-itk force-pushed the feature/changelog-format-detection branch from a540259 to c8abfdb Compare November 5, 2024 20:49
@rimi-itk rimi-itk marked this pull request as ready for review November 6, 2024 09:47
}

if len(templates) < 1 {
return "", fmt.Errorf("cannot detect pull request entry format")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think providing an entry with a fallback template is the better option here. Even if it doesn't match the changelog entry format, it would still be faster for the user to edit the format than to enter it manually.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree! I had the same thought, but couldn't make my mind up on how to handle this.

Copy link
Collaborator

@jeppekroghitk jeppekroghitk left a comment

Choose a reason for hiding this comment

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

🚀

@rimi-itk rimi-itk merged commit fd40093 into main Nov 7, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants