Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Prefill new "Releases" with query parameters #1410

Closed
sindresorhus opened this issue Nov 21, 2018 · 4 comments
Closed

Prefill new "Releases" with query parameters #1410

sindresorhus opened this issue Nov 21, 2018 · 4 comments

Comments

@sindresorhus
Copy link

GitHub supports prefilling issues using query parameters. It would be very useful if this worked when creating new "Releases" too. Then scripts could pre-generate the release notes for new releases based on the commits and just open it for the user to edit and then publish it.

For example: https://github.com/chalk/chalk/releases/new?tag=v1.0.0&title=Foo&body=Notes would prefill the tag, title, and body fields. Since it works with issues, I kinda expected this to work with Releases too and was surprised when it didn't.

The alternative is using the GitHub API to create the actual release, but this is more complicated and requires either creating a login flow or requiring the user to get an access token, both of which are too much overhead for simple tools.

My specific use-case is being able to open a prefilled "Releases" entry for the user after publishing an npm package version with https://github.com/sindresorhus/np

@sindresorhus
Copy link
Author

@AraHaan Please open a separate issue. This is totally unrelated.

@AraHaan
Copy link

AraHaan commented Nov 27, 2018

#1417

@mattyoho
Copy link

👋 @sindresorhus

We've just added support for pre-filling the fields of the new Release form via query parameters. The supported parameters are:

tag
The tag name for the Release.
target
The branch name or commit oid to point the Release's tag at, if the tag doesn't already exist.
title
The name of the Release.
body
The description text of the Release.
prerelease
Whether the Release should be tagged as a pre-release; valid values are "1" or "true".

Hopefully this does the trick!

@sindresorhus
Copy link
Author

Thank you! That was super-fast. 🙌


For Node.js usage, I made a simple module to make it easier to use: https://github.com/sindresorhus/new-github-release-url

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants