-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fetch stats for issues closed for version-data #11
base: master
Are you sure you want to change the base?
Conversation
Uses generation from mybb/mybb-build#11
Uses generation from mybb/mybb-build#11
To keep it simple and hosting-agnostic, how about resolving everything (API URLs, repository paths) from a single repository URL: <property name="issuesRepository" value="${sourceGitRepository}" /> We can use e.g. getIssuesData(string $issuesRepository, string $resolvedIssuesMilestone): array Overriding milestones in <property name="resolvedIssuesMilestone" override="false" value="${targetVersion}" /> we can use it to create a pattern for <property name="resolvedIssuesLink" value="https://github.com/mybb/mybb/issues?q=is%3Aissue%20is%3Aclosed%20label%3As%3Aresolved%20milestone%3A${resolvedIssuesMilestone}" /> |
That would be better but might be unnecessary complication at this point because if we are't implementing a different hosting provider why be agnostic before we need to?
I went with the milestone number as you can fetch by the number, overriding the name still means fetching all milestones and looping through to find the right one. I'll implement your other suggestions now :) |
We should get cleaner code; the current system is not necessarily short-term, since we may reuse it to automate things later. I've updated PHP to 7.4 and when we get the chance we should update the PHP scripts to use type declarations and strict mode.
Yes, in this case it would fetch the ID as an intermediate step in all cases - it doesn't look like there would be any benefit to people operating on IDs directly. |
Fair enough, I was going with how the code is already structured else I would've used a library for the API :-) |
Also I meant to mention this before but do you think it would be better to trigger the issue stats in a GitHub action rather than in the package build process? Removes the need to be online for the package build and the issue stats aren't exactly necessary at release and could be done when pushing to mybb/mybb.com. The graphs don't have to include the current release at the exact moment it is released. I only worked on the code for this repo since it is where the release YAML is generated but I think it would be better to not be done on the critical flow. |
Ideally these graphs would be provided by GH's Insights, or a third party service, as these are less related to release metadata and more to development metrics (and so that we don't have to deal with it at all), but I wasn't able to find anything useful. We include the issue count in version files (which should be available to the release manager to generate announcements), but it may make sense to have some cache file updated in |
E.g. for MyBB 1.8.22: