Skip to content

Commit

Permalink
fix: upload release notes to the Github (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
heenakwag committed Dec 12, 2019
1 parent 0f67a97 commit 438427c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Run npm scripts and develop yourself with the following process.

Fork `master` branch into your personal repository.
Clone it to local computer. Install node modules.
Before starting development, you should check to haveany errors.
Before starting development, you should check to have any errors.

``` sh
$ git clone https://github.com/{your-personal-repo}/toast-ui.release-notes.git
Expand Down
6 changes: 4 additions & 2 deletions src/GithubHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
const Github = require('github-api');
const { isValidRepositoryUrl, hasGithubToken, getRepositoryInfo } = require('./utils');

const SUCCESS_STATUS = [200, 201];

class GithubHelper {
/**
* Set authentication repository config
Expand Down Expand Up @@ -39,7 +41,7 @@ class GithubHelper {
*/
_request(api) {
return api().then(response => {
if (response.status !== 200) {
if (SUCCESS_STATUS.indexOf(response.status) < 0) {
throw new Error(this._pretty(response));
}

Expand Down Expand Up @@ -195,7 +197,7 @@ class GithubHelper {
*/
publishReleaseNote(releaseNote) {
const options = {
tagName: this.releasingTag,
tag_name: this.releasingTag, // eslint-disable-line camelcase
name: this.releasingTag,
body: releaseNote
};
Expand Down

0 comments on commit 438427c

Please sign in to comment.