-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Improved changelog generator #30724
Merged
ZhilkinSerg
merged 15 commits into
CleverRaven:master
from
KurzedMetal:improved_changelog_generator
May 24, 2019
Merged
Improved changelog generator #30724
ZhilkinSerg
merged 15 commits into
CleverRaven:master
from
KurzedMetal:improved_changelog_generator
May 24, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Load "Last Hash" for all builds that actually have that attribute in the Jenkins API (previously it was loaded only for "SUCCESSFUL" builds) * Avoids ignoring "FAILED" builds on output, they usually fail only for some specific platforms. Players and devs may care about them. * Instead we make sure we always have the "Last Hash" for the builds to show on the output, which is what we actually use to match builds to pull requests.
ifreund
added
[Python]
Code made in Python
<Enhancement / Feature>
New features, or enhancements on existing
labels
May 21, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Infrastructure "Improve changelog generator (tools/generate_changelog.py)"
I made some overall improvements, some de duplication of code, a bit more threading, improved the "by-build" output format a bit and specially added the ability to generate "by build" and "by date" outputs in a single run, while previously it would require two script runs and make the expensive github calls twice.
How to use
With these changes, the parameters changed a bit, now you can specify
--by-build
and/or--by-date
(or both) in a single call, each of accept a different filename to indicate where to save the output, if you use-
(dash), it will use standard output.Example 1: Generates both changelog formats in different files
generate_changelog.py 2019-05-10 --include-summary-none --verbose --by-build "cdda_changelog_by_build.txt" --by-date "cdda_changelog_by_date.txt"
Example 2: Generate --by-build changelog format in a file
generate_changelog.py 2019-05-10 --include-summary-none --verbose --by-build "cdda_changelog_by_build.txt"
Example 3: Generate --by-date changelog format in standard output
generate_changelog.py 2019-05-10 --include-summary-none --verbose --by-date -
Purpose of change
I tend to check this output for the last few weeks before playing to keep up with project development and changes and I find both output formats quite useful, so I decided to improve it a bit and I thought the project / other player could find it useful.
Describe alternatives you've considered
Not related to this but, I've been tempted to use some template engine like Jinja2 to make it easier to manage the format output but I kinda want to avoid adding external dependencies, so far the script super simple to run even without python knowledge, if I add external dependencies it will require to know a thing or two and do some steps before execution (besides installing python)