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

Add check for frozen CHANGELOG.md sections #10537

Merged
merged 32 commits into from
Oct 22, 2023
Merged

Conversation

koppor
Copy link
Member

@koppor koppor commented Oct 21, 2023

This uses clparse to detect updates to sections of CHANGELOG.md of released versions. This happens if PRs are longer-lasting than releases.

It implements the suggestion of NiclasvanEyk/keepac#20 (comment)

This PR cannot use heylogs, because nbbrd/heylogs#146 is not merged (and thus the functionality is not available).

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 21, 2023

While the PR was in progress, JabRef released a new version. You have to merge upstream/main and move your entry in CHANGELOG.md to section ## [Unreleased].

It might also be that another CHANGELOG.md issue arose. You can check the detailed error output at the tab "Checks", section "Tests" (on the left), subsection "CHANGELOG.md".

@koppor
Copy link
Member Author

koppor commented Oct 21, 2023

Step does not fail

 /home/runner/work/_temp/8e83877a-ff3f-4b97-8901-01baba8a5f03.sh: line 4: clparse: command not found
/home/runner/work/_temp/8e83877a-ff3f-4b97-8901-01baba8a5f03.sh: line 4: clparse: command not found
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git

@koppor
Copy link
Member Author

koppor commented Oct 22, 2023

Cannot handle our format:

git show main:CHANGELOG.md | clparse --format=json -
   {                                                                                                     
     "version": null,                                                                                    
     "link": "https://github.com/JabRef/jabref/compare/v5.9...v5.10",                                    
     "date": null,                                                                                       
     "changes": [                                                                                        
       {                                                                                                 
         "added": "We added a field showing the BibTeX/biblatex source for added and deleted entries in t
e \"External Changes Resolver\" dialog. [#9509](https://github.com/JabRef/jabref/issues/9509)"           
       },                                                                                                
       {                                                                                                 
``´

@koppor
Copy link
Member Author

koppor commented Oct 22, 2023

Blocked by marcaddeo/clparse#22

@koppor
Copy link
Member Author

koppor commented Oct 22, 2023

@koppor
Copy link
Member Author

koppor commented Oct 22, 2023

WTF

I don't get it. Why is the commit id of the checkout branch differently than the commit id which kicked-off the workflow?

image

image

@koppor
Copy link
Member Author

koppor commented Oct 22, 2023

Output with failing CHANGELOG.md:

CHANGELOG.md
     1:1  error  Expecting consistent version-date separator \u002d, found [\u2013]  consistent-separator (ignored)
    24:1  error  Change in a released version                                        releasechangesfrozen
  1168:1  error  Missing ref link                                                    all-h2-contain-a-version (ignored)

  3 problems

Output with "correct" CHANGELOG.md:

 CHANGELOG.md
     1:1  error  Expecting consistent version-date separator \u002d, found [\u2013]  consistent-separator (ignored)
  1168:1  error  Missing ref link                                                    all-h2-contain-a-version (ignored)

  2 problems

@koppor koppor marked this pull request as ready for review October 22, 2023 21:02
@koppor
Copy link
Member Author

koppor commented Oct 22, 2023

Output of the bot in case of an error:

image

@koppor
Copy link
Member Author

koppor commented Oct 22, 2023

Localization at test output:

image

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Oct 22, 2023
@calixtus calixtus enabled auto-merge October 22, 2023 22:01
@calixtus calixtus disabled auto-merge October 22, 2023 22:01
@calixtus calixtus enabled auto-merge October 22, 2023 22:01
@github-actions
Copy link
Contributor

github-actions bot commented Oct 22, 2023

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

@calixtus calixtus disabled auto-merge October 22, 2023 22:20
@calixtus calixtus merged commit 2807229 into main Oct 22, 2023
@calixtus calixtus deleted the add-changelog-diff-check branch October 22, 2023 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants