Skip to content
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

Configuration: add ability to create releases as prerelease #678

Closed
Tracked by #417
MarcoIeni opened this issue Apr 8, 2023 · 9 comments · Fixed by #1228
Closed
Tracked by #417

Configuration: add ability to create releases as prerelease #678

MarcoIeni opened this issue Apr 8, 2023 · 9 comments · Fixed by #1228
Labels
enhancement New feature or request good first issue Good for newcomers priority:low This can wait

Comments

@MarcoIeni
Copy link
Owner

MarcoIeni commented Apr 8, 2023

In the config file:

[[package]]
name = "my_pkg"
# If set to auto, will mark the release as not ready for production
# in case there is a semver pre-release in the tag e.g. v1.0.0-rc1
# If set to prod, will mark the release as ready for production. (default).
# If set to pre, will mark the release as not ready for production.
git_release_type = "auto"

we already read this field from the config, but we don't use it:

pub release_type: Option<ReleaseType>,

You can take inspiration from #986

@ybaldus
Copy link
Contributor

ybaldus commented Jan 22, 2024

Hi,

I would like to work on this issue. I looked through #986 and did something similiar for github. From my understanding of the API this is only possible for github, is that correct? How do you usually test those things? I'm a newcomer and also new to Rust and would like to contribute more often.

@MarcoIeni
Copy link
Owner Author

Hi! If gitea and gitlab don't have pre-releases, we can make this feature github only. Let's make it explicit in the doc 👍

Usually I test these things manually.
While for gitea I write integration tests since it's open source and I run it as a docker container together with the test suite 👍

@MarcoIeni
Copy link
Owner Author

Pr welcome! Release-plz is rust beginner-friendly, so no worries if the pr is not perfect

@ybaldus
Copy link
Contributor

ybaldus commented Jan 23, 2024

From my understanding github and gitea API is the same.
https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release
https://docs.gitea.com/api/1.20/#tag/repository/operation/repoCreateRelease

For gitlab I couldn't find anything similar, same goes for the draft release:
https://docs.gitlab.com/ee/api/releases/#create-a-release

I will test my code now and create an integration test. Could you guide me to the right place within the documentation?

@MarcoIeni
Copy link
Owner Author

MarcoIeni commented Jan 23, 2024

Sounds good! For the docs, you can add the new option here: https://release-plz.ieni.dev/docs/config

Let's specify that this option will only work on github and gitea.

@ybaldus
Copy link
Contributor

ybaldus commented Jan 24, 2024

I created #1228. This one misses the integration tests because we do not test the release action at moment at all and I don't really know where to start.

@MarcoIeni
Copy link
Owner Author

MarcoIeni commented Jan 24, 2024

Thanks for the PR, I will have a look 🙏
Btw, we test the release command here. You can create a new test where you use the gitea API to verify that a release was created.

@ybaldus
Copy link
Contributor

ybaldus commented Jan 24, 2024

Okay thank you, I will take a look at it.

I just found out that I broke this test and I don't know why.

@MarcoIeni
Copy link
Owner Author

I fixed the test 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers priority:low This can wait
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants