-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix type error #23
Closed
Closed
Fix type error #23
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
Add composite action to create upstream tag The release_bot.py contains several steps, which were previously part of our release script in osbuild/maintainer-tools. The script here is much shorter though. Things that were dropped were the sanity checks, because we can presume that the git repository at hand is sane, that the git remote is well configured etc. Furthermore all interactivity of the original script was removed. Even though I had recently added a --no-interactive mode to the original script, I just felt this would make the code harder to read. The rationale for making this a composite action instead of a standalone repository was that this way each component can define it's own automated schedule and that there would be some representation in the GitHub Actions for the component of the tag being created. Getting the component/repository name as a separate step vs. just using `github.event.repository.name` is done so it also works when being triggered from schedule (the event payload is missing in this case).
This was a leftover from a previous stage of this script.
In the contributors list we don't want to list the post release version bump author since it is most likely a bot.
This reverts commit a1a5262.
Also the colon feels just like a visual clutter: let's remove it.
Now the order feels arbitrary, let's just sort the list alphabetically for now.
Add an option to create new tag for a release using semantic versioning by incrementing the major version and zeroing the rest of the version. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Co-authored-by: Ondřej Budai <obudai@redhat.com>
The script would skip pushing a tag if there is only one new commit in the repository, but it is not the one that bumps the version post-release. Check for this specific case and push tags even if there is just a single new functional commit. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Enhance the create-tag action to optionally allow bumping the minor or patch parts of the semantic version, in addition to already supported major version bumps. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Support bumping of minor or patch versions with semantic versioning
Previously, the code used `split('\n')` on commands, which were listing commits since the last release. However, splitting an empty string with a specified separator returns [''], which fooled the code to behave as if there was one commit since the last release. As a result, the code would push a new release tag, even if there were no new commits. Fix this by using `splitlines()`, which returns an empty list when used on empty string. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Make `args` global and run more actions which do not modify the repository when --dry-run is provided. This helps with testing the script on a real git repository. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
The script always prints the configuration used for its run. Include the semver bump type in case semver is enabled. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
`git describe` gets confused when the same commit have more than one tag. In such case, it may or may not return the latest tag. In [1], the action detected the v0.2.0 tag as the latest, while there was already the v0.3.0 tag attached to the same commit. As a result, the action tried to recreate the v0.3.0 tag, which already exists in the repo. The action does that every time it is run in the repo. Move to using `git tag -l --merged` to get all tags in the repo, which are reachable from the current commit. Sort them in the ascending order and take the last item from the list as the latest tag. Use `packaging.Version` to represent releases. This makes sorting of the list of existing releases to produce expected results. In addition, refactor the `autoincrement_version()` to also use `packaging.Version` when parsing the latest version and bumping it. As a side-effect, a bug with "simple dot-release" is fixed, when the code bumped only the last digit in the latest version, not the whole number after the last dot. [1] https://github.com/osbuild/images/actions/runs/5995856979/job/16259501077 Signed-off-by: Tomáš Hozza <thozza@redhat.com>
To every PR in the changelog we add a deduplicated and sorted list of reviewers and the author of the change. Fixes osbuild#21
All contributors, both authors and reviewers, are now part of the changelog.
join expects str, so pass a string instead of None.
ochosi
force-pushed
the
fix-type-error
branch
from
September 25, 2023 08:01
1a343ec
to
1f74e45
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is the simple/naive way of fixing a TypeError when there are no reviewers.
This problem occurs not only when someone admin-merges without approval, it also seems to happen on auto-merged dependabot updates (e.g. osbuild/images#168)