Skip to content

Commit

Permalink
feat: Add RTD URL into not comment but the PR body
Browse files Browse the repository at this point in the history
  • Loading branch information
KengoTODA committed Sep 10, 2018
1 parent 05ebb8c commit c205693
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ROADMAP
- [ ] support multiple languages
- accept array as `rtd.project`
- consider that the URL of translated project uses id of parent project (e.g. `spotbugs` for `spotbugs-ja`)
- [ ] post URL of RTD page _after_ RTD build has successfully finished
- [x] post URL of RTD page _after_ RTD build has successfully finished
- [ ] use GitHub Check to mark PR failed iff build on RTD failed
- [ ] set privacy level as 'public' at when enable RTD build
- [ ] edit the original pull request body at the very bottom and add the link there
Expand Down
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ module.exports = (app: Application) => {
log.debug(`Reporting document URL to GitHub PR page of ${branch} branch in ${project}.`);
const language = config.rtd.language || "en";
const url = `https://${project}.readthedocs.io/${language}/${branch}/`;
context.github.issues.createComment(context.issue({
body: `RTD build has been started. Check generated document at ${url} later`,
const body = context.payload.issues.body + `\n\nURL of RTD document: ${url}`;
context.github.issues.edit(context.issue({
body,
}));
} else {
log.debug(`RTD build for ${branch} branch in ${project} is already activated.`);
Expand Down

0 comments on commit c205693

Please sign in to comment.