/portable-github-issues-form

A drop-in javascript-powered user feedback form that posts to a given github repository issues.

Primary LanguageJavaScript

Portable GitHub Issues Form

Easily add a beautiful Bug Report form on your website/application, that is sent to a GitHub repository Issues. 3 lines of code and you are done.

Demo

How to use

Add the provided javascript file right before the end body tag, then instantiate the Issue object, using your project's repository credentials :

<script src="https://cdn.jsdelivr.net/gh/pixeline/portable-github-issues-form/bundle.js" ></script>
<script>
var githubForm =  new GithubIssueForm({ 'token': 'xxx', 'useragent': 'portable-github-issues-form', 'repository': 'pixeline/portable-github-issues-form', 'milestone': null });
githubForm.inject();
Issue.inject();
</script>

Configuration

The function accepts the following options:

  • token: GitHub [access token][github-token] (required).
  • useragent: [user agent][github-user-agent] string.
  • body: issue content.
  • assignees: GitHub usernames of assigned users.
  • milestone: associated milestone number.
  • labels: array of associated labels.

To authenticate with GitHub, set the token option. You can obtain a token here. Only enable "public_repo" access for public repositories, "repo" for private.

var opts = {
    'token': 'tkjorjk34ek3nj4!'
};

Want to contribute ?

npm install -g watchify browserify

then

watchify ./src/portable-github-issues-form.js -o bundle.js

Credits