Skip to content

Commit 438427c

Browse files
committed
fix: upload release notes to the Github (#8)
1 parent 0f67a97 commit 438427c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Run npm scripts and develop yourself with the following process.
113113

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

118118
``` sh
119119
$ git clone https://github.com/{your-personal-repo}/toast-ui.release-notes.git

src/GithubHelper.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
const Github = require('github-api');
44
const { isValidRepositoryUrl, hasGithubToken, getRepositoryInfo } = require('./utils');
55

6+
const SUCCESS_STATUS = [200, 201];
7+
68
class GithubHelper {
79
/**
810
* Set authentication repository config
@@ -39,7 +41,7 @@ class GithubHelper {
3941
*/
4042
_request(api) {
4143
return api().then(response => {
42-
if (response.status !== 200) {
44+
if (SUCCESS_STATUS.indexOf(response.status) < 0) {
4345
throw new Error(this._pretty(response));
4446
}
4547

@@ -195,7 +197,7 @@ class GithubHelper {
195197
*/
196198
publishReleaseNote(releaseNote) {
197199
const options = {
198-
tagName: this.releasingTag,
200+
tag_name: this.releasingTag, // eslint-disable-line camelcase
199201
name: this.releasingTag,
200202
body: releaseNote
201203
};

0 commit comments

Comments
 (0)