Skip to content

tools/changelog-helper: Ignore non-MERGED PRs & ignore already listed PRs faster#2485

Merged
hoffie merged 3 commits intojamulussoftware:masterfrom
hoffie:changelog-helper-MERGED-only
Mar 12, 2022
Merged

tools/changelog-helper: Ignore non-MERGED PRs & ignore already listed PRs faster#2485
hoffie merged 3 commits intojamulussoftware:masterfrom
hoffie:changelog-helper-MERGED-only

Conversation

@hoffie
Copy link
Copy Markdown
Member

@hoffie hoffie commented Mar 9, 2022

Short description of changes

  • tools/changelog-helper: Ignore non-MERGED PRs

  • tools/changelog-helper: Ignore already listed PRs faster

CHANGELOG: Internal: Improved Changelog release tooling.

Context: Fixes an issue?

#1865 (comment)

Does this change need documentation? What needs to be documented and how?

Status of this Pull Request

Ready.

What is missing until this pull request can be merged?

Ready.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@hoffie hoffie added this to the Release 3.9.0 milestone Mar 9, 2022
@hoffie hoffie requested a review from ann0see March 9, 2022 23:28
Comment thread tools/changelog-helper.sh Outdated
fi
checked_ids[$id]=1
local json=$(gh pr view "${id/#/}" --json title,author)
if grep -qF "#$id" <<<"$changelog"; then
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That will find #300 if the list contains #3000 through to #3009. A more precise match would be good.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point. Will probably add \b or something around that later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated (no \b though).

Copy link
Copy Markdown
Collaborator

@pljones pljones left a comment

Choose a reason for hiding this comment

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

Line 129 needs a better matcher.

Comment thread tools/changelog-helper.sh Outdated
fi
checked_ids[$id]=1
if grep -qF "#$id" <<<"$changelog"; then
if grep -qP "#$id([^0-9]|$)" <<<"$changelog"; then
Copy link
Copy Markdown
Collaborator

@pljones pljones Mar 11, 2022

Choose a reason for hiding this comment

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

Doesn't "#$id\>" work? I don't think I'd want it matching #12AB, either. (Think commit IDs.)

Copy link
Copy Markdown
Member Author

@hoffie hoffie Mar 11, 2022

Choose a reason for hiding this comment

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

Doesn't "#$id\>" work?

I didn't know about that -- thanks! It works in -E mode (maybe \b might have worked there, too). Updated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think \b will only work in -P (PCRE) mode, if the installed version of grep supports it. I prefer \< and \> if I'm not actually writing perl or PHP.

hoffie added a commit to hoffie/jamulus that referenced this pull request Mar 11, 2022
jamulussoftware#2485 (comment)

Co-authored-by: Peter L Jones <pljones@users.noreply.github.com>
@hoffie hoffie force-pushed the changelog-helper-MERGED-only branch from 68f6b7b to b4dde92 Compare March 11, 2022 22:16
Comment thread tools/changelog-helper.sh
fi
checked_ids[$id]=1
local json=$(gh pr view "${id/#/}" --json title,author)
if grep -qE "#$id\>" <<<"$changelog"; then
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you add a comment on what this does and why, please.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

And, perhaps - like the "not merged" below - echo a message.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Can you add a comment on what this does and why, please.

Done.

And, perhaps - like the "not merged" below - echo a message.

Hm, I'm not convinced. It was generally nice to see that repeated invocations of this script added less and less stuff (e.g. when run again later in the release process). If we generate a line of output of each PR even if it was already there, the output becomes harder to read, IMO. If you feel strongly, I can add it though.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, that's why I was hesitant. Probably best without.

jamulussoftware#2485 (comment)

Co-authored-by: Peter L Jones <pljones@users.noreply.github.com>
@hoffie hoffie force-pushed the changelog-helper-MERGED-only branch from b4dde92 to e92000a Compare March 12, 2022 21:05
@hoffie hoffie merged commit 577495f into jamulussoftware:master Mar 12, 2022
@hoffie hoffie deleted the changelog-helper-MERGED-only branch March 12, 2022 21:53
pgScorpio pushed a commit to pgScorpio/jamulus that referenced this pull request Mar 28, 2022
jamulussoftware#2485 (comment)

Co-authored-by: Peter L Jones <pljones@users.noreply.github.com>
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.

4 participants