Skip to content

changelog github integration #466

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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

burner
Copy link
Member

@burner burner commented Dec 17, 2023

graphql query works mostly

bearer not working anymore

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @burner!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + tools#466"

Copy link
Member

@ibuclaw ibuclaw left a comment

Choose a reason for hiding this comment

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

Let me know when it's no longer a draft.

@burner burner changed the title DRAFT: changelog github integration changelog github integration Feb 21, 2024
@burner
Copy link
Member Author

burner commented Feb 21, 2024

@ibuclaw I've taken another look, and I think there is nothing more to do until it fails in prod

@ibuclaw
Copy link
Member

ibuclaw commented Jan 14, 2025

FYI, you could perhaps test this with something like:

rdmd -version=Contributors_Lib changed v2.109.1..upstream/stable \
    --version=2.110.0 --date='Feb 01, 2025' --output=../dlang.org/changelog/2.110.0_pre.dd

Which is what's ran to generate the dlang.org changelog.

graphql query works mostly

bearer not working anymore
next thing to do is wire in the closed github issues even if there where
not closed by a commit
now I need to integrate the github issues into the output
@burner burner force-pushed the github_issue_changelog_integeration branch from 513d070 to 00bf95f Compare January 17, 2025 16:24
@burner
Copy link
Member Author

burner commented Feb 8, 2025

@ibuclaw it should ignore PR's now

Newlines in issues could either be `\n` or `\r\n`.
When no revision range is given, should instead skip all checking of bugzilla and gitlab.
Prefer to skip checking GitHub when no access token is provided.
Treat the absence of the option as skipping the check for GitHub issues.
Issues closed after the release date should be ignored.
@ibuclaw
Copy link
Member

ibuclaw commented Mar 5, 2025

This is sort of better now, thinking this through, my only remaining gripe is that getGithubIssuesRest doesn't distinguish between issues closed against stable vs master?

As it stands, it looks like bugs fixed in master-only get wrongly attributed to the current release, when they should be in the next (when master->stable is merged again).

Unfortunately this likely means the approach done here is probably wrong, and needs a complete do over. i.e: just scan for Fix #NNNNN in the commit title like bugzilla?

changed.d Outdated
struct GitIssues
{
int[] bugzillaIssueIds;
int[] githubIssueIds;
Copy link
Member

Choose a reason for hiding this comment

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

Here. It looks like these are indeed collected, but then ignored.

@ibuclaw
Copy link
Member

ibuclaw commented Mar 6, 2025

This is sort of better now, thinking this through, my only remaining gripe is that getGithubIssuesRest doesn't distinguish between issues closed against stable vs master?

$(BUGSTITLE_GITHUB DMD Compiler bug fixes,

$(LI $(GITHUB 17118): GC not collecting under Windows)
...
$(LI $(GITHUB 20929): #line directives mess up -verrors=context)
)
...
Macros:
    VER=2.110.0
  1. GC not collecting under Windows dmd#17118 is just a closed issue, (there's no commit to say it was fixed in this release).
  2. #line directives mess up -verrors=context dmd#20929 was closed by PR 20930, which went to master, so not part of 2.110.

ibuclaw added 2 commits March 6, 2025 05:14
Switch back to using current date, worst case for now is wait time for large response.
Now unused.
Issues may be closed by a PR to the master branch, they should not appear as a changelog entry against stable.
This is because each project has a different url path to link to their issues.
@ibuclaw
Copy link
Member

ibuclaw commented Mar 6, 2025

This now emits.

$(BUGSTITLE_GITHUB DMD Compiler bug fixes,

$(LI $(DMDGITHUB 18281): ICE on attempt to compare deref of two functions ptr)
$(LI $(DMDGITHUB 20859): ICE: class with __vtbl field name causes segfault in Scope::inCfile)
$(LI $(DMDGITHUB 20894): pragma$(LPAREN)msg$(RPAREN) interprets printf format specifiers)
$(LI $(DMDGITHUB 20907): DMD segfaults with static array length parameter derived from left-shifted template parameter property)
)
$(BUGSTITLE_GITHUB Phobos bug fixes,

$(LI $(PHOBOSGITHUB 10574): std.process execve depends on environ pointer not changing)
)

Now needs macros defined in changelog/changelog.ddoc to be useful.

@burner
Copy link
Member Author

burner commented Mar 7, 2025

This now emits.

$(BUGSTITLE_GITHUB DMD Compiler bug fixes,

$(LI $(DMDGITHUB 18281): ICE on attempt to compare deref of two functions ptr)
$(LI $(DMDGITHUB 20859): ICE: class with __vtbl field name causes segfault in Scope::inCfile)
$(LI $(DMDGITHUB 20894): pragma$(LPAREN)msg$(RPAREN) interprets printf format specifiers)
$(LI $(DMDGITHUB 20907): DMD segfaults with static array length parameter derived from left-shifted template parameter property)
)
$(BUGSTITLE_GITHUB Phobos bug fixes,

$(LI $(PHOBOSGITHUB 10574): std.process execve depends on environ pointer not changing)
)

Now needs macros defined in changelog/changelog.ddoc to be useful.

I think I found the bugzilla one in dlang.org/dlang.org.ddoc but I'm not sure if that is the place to add the (DMD|PHOBOS)GITHUB ones!?

@ibuclaw
Copy link
Member

ibuclaw commented Mar 9, 2025

Isn't bugstitle going to be identical to the bugzilla macro?
https://github.com/dlang/dlang.org/blob/4c5af3460f7e75974a32fd4f62adf470a54b88de/changelog/changelog.ddoc#L41

And for the githubxxx ones, I think first define GITHUB (or GITHUB_ISSUE) as the base URL macro, then the others are to the effect of

DMDGITHUB = $(GITHUB dmd,$1)

See also:
https://github.com/dlang/dlang.org/blob/4c5af3460f7e75974a32fd4f62adf470a54b88de/changelog/changelog.ddoc#L67

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.

3 participants