https://github.com/helpers/helper-issue
Helper to create a URL that pre-populates a Github issue.
https://github.com/helpers/helper-issue
Last synced: 4 months ago
JSON representation
Helper to create a URL that pre-populates a Github issue.
- Host: GitHub
- URL: https://github.com/helpers/helper-issue
- Owner: helpers
- License: mit
- Created: 2015-09-03T13:10:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-23T01:49:07.000Z (about 10 years ago)
- Last Synced: 2025-09-19T12:35:02.383Z (4 months ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 3
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing-issue.md
- License: LICENSE
Awesome Lists containing this project
README
# helper-issue [](https://www.npmjs.com/package/helper-issue) [](https://travis-ci.org/helpers/helper-issue)
> Helper to create a URL that pre-populates a Github issue.
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i helper-issue --save
```
## Usage
```js
var issue = require('helper-issue');
```
## API
### [issue](index.js#L32)
Helper to create a URL that pre-populates a Github issue.
**Params**
* `repository` **{String|Object}**: Repository string or object.
* `data` **{Object}**: Data object to add as query parameters to the generated URL.
* `data.title` **{String}**: Short string to populate the github issue title field.
* `data.body` **{String}**: Markdown string to populate the github issue body field.
* `returns` **{String}**: URL that can be used in an anchor tag.
**Example**
```js
var url = issue('helpers/helper-issue', {
title: 'Issue Title',
body: 'Issue body that may contain markdown'
});
//=> https://github.com/helper/helper-issue/issues/new?title=Issue%20Title&body=Issue%20body%20that%20may%20contain%20markdown
```
## Related projects
[parse-github-url](https://www.npmjs.com/package/parse-github-url): Parse a github URL into an object. | [homepage](https://github.com/jonschlinkert/parse-github-url)
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Contributing
## Author
**Brian Woodward**
+ [github/helpers](https://github.com/helpers)
+ [twitter/doowb](http://twitter.com/doowb)
## License
Copyright © 2015 [Brian Woodward](https://github.com/doowb)
Released under the MIT license.
***
_This file was generated by [verb](https://github.com/verbose/verb) on December 22, 2015._