Skip to content

Commit 95b0ad1

Browse files
committed
feat: tweaks for PRs and comment
1 parent 3f2ce02 commit 95b0ad1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/OptionsConfig/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class OptionsConfig {
5252
}
5353

5454
getRaw() {
55-
return JSON.stringify(this.options)
55+
return `${JSON.stringify(this.options, null, 2)}\n`
5656
}
5757

5858
getPath() {

src/Repository/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class Repository {
124124
base: 'master',
125125
maintainer_can_modify: true,
126126
})
127-
return result.data.number
127+
return result.data.html_url
128128
}
129129

130130
async createPullRequestFromFiles({ title, body, filesByPath, branchName }) {
@@ -135,13 +135,13 @@ class Repository {
135135
branchName,
136136
})
137137

138-
const pullRequestNumber = await this.createPullRequest({
138+
const pullRequestURL = await this.createPullRequest({
139139
title,
140140
body,
141141
branchName,
142142
})
143143

144-
return pullRequestNumber
144+
return pullRequestURL
145145
}
146146
}
147147

src/processIssueComment.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ async function processIssueComment({ context, commentReply }) {
5151
originalSha: optionsConfig.getOriginalSha(),
5252
}
5353

54-
const pullRequestNumber = await repository.createPullRequestFromFiles({
54+
const pullRequestURL = await repository.createPullRequestFromFiles({
5555
title: `docs: add ${who} as a contributor`,
5656
body: `Adds ${who} as a contributor for ${contributions.join(
5757
', ',
5858
)}.\n\nThis was requested by ${commentReply.replyingToWho()} [in this comment](${
59-
commentReply.replyingToWhere
59+
commentReply.replyingToWhere()
6060
})`,
6161
filesByPath: filesByPathToUpdate,
6262
branchName: `all-contributors/add-${who}`,
6363
})
6464

6565
commentReply.reply(
66-
`I've put up [a pull request](#${pullRequestNumber}) to add ${who}! :tada:`,
66+
`I've put up [a pull request](${pullRequestURL}) to add ${who}! :tada:`,
6767
)
6868
}
6969

0 commit comments

Comments
 (0)