Motivation
You can have issue form fields prefilled by specifying certain query parameters in the "New Issue" URL (https://github.com/<User | Organization>//issues/new).
For example:
https://github.com/EstebanBorai/github-issue-url/issues/new?
title=Null%3A+The+Billion+Dollar+Mistake
&body=Null+is+a+flag.+It+represents+different+situations
&template=bug_report.md
&labels=bug%2Cproduction%2Chigh-severity
&assignee=EstebanBorai
&milestone=1
&projects=1
This way you can provide a one click "Open Issue" button to your Rust applications, for instance you could have some stack trace, or details read from the host system where your application is running to let the user open an issue on GitHub without the need of specifying system /or application details themselves.
Installation
[]
= "0.1"
Usage
To create a URL like the one shown above you must use the Issue
struct included
in this crate, specify the repository owner and the repository name, and then
define the relevant fields such as title, body, template, labels, assginee,
milestone and/or projects, using the "setter-like" methods.
use Issue;
const GITHUB_ISSUE_LINK: &str = "https://github.com/EstebanBorai/github-issue-url/issues/new?title=Null%3A+The+Billion+Dollar+Mistake&body=Null+is+a+flag.+It+represents+different+situations+depending+on+the+context+in+which+it+is+used+and+invoked.+This+yields+the+most+serious+error+in+software+development%3A+Coupling+a+hidden+decision+in+the+contract+between+an+object+and+who+uses+it.&template=bug_report.md&labels=bug%2Cproduction%2Chigh-severity&assignee=EstebanBorai&milestone=1&projects=1";
let mut have = new.unwrap;
have.title;
have.body;
have.template;
have.labels;
have.assignee;
have.milestone;
have.projects;
let have = have.url.unwrap;
assert_eq!;
Release
Contributing
Every contribution to this project is welcome! Feel free to open a pull request or an issue.
License
Licensed under both the MIT License and the Apache 2.0 License.