Skip to content

Merge PRs and Add Comments

Samad Yar Khan edited this page Sep 4, 2022 · 1 revision

Merge Pull Requests and Add Comments

  • GitHub app allows users to look up a pull request either by /github search or /github owner/repo pulls #pullNumber.
  • Pull Request code changes and different details can be viewed in fileCodeModal and pullDetailsModal respectively.
  • Authorized users can merge pull request inside the mergePullRequestModal which makes use of mergePullRequest method from the githubSDK.
  • Pull Request Comments be viewed inside pullRequestCommentsModal and new comments can be added to any pull request using addPullRequestCommentsModal which uses addNewPullRequestComment method from the githubSDK.

User Flow

Merging Pull request using slash command:

  • Enter /github owner/repo pulls #pullNumber.
  • This triggers the pullDetailsModal. The pullDetailsModal displays the different file changes and merge status of the given pull request.
  • Clicking the merge button triggers mergePullRequestModal which enables user to merge the pull request using different methods.
  • mergePullRequestModal makes use of mergePullRequest method from the githubSDK and once the PR is merged, a notification is sent to the channel, along with the merged pull request URL.

image

Merging Pull request using GitHub Search:

  • Enter /github search.
  • This will trigger the githubSearchModal. After Entering the repository name, we can see a list of pull requests.
  • Click on view changes on any of the pull requests to trigger pullDetailsModal and after that the above mentioned workflow will follow.

image

Adding Comments to a pull request

  • After following the above mentioned workflows, the user can click on comments button on pullDetailsModal modal to trigger pullRequestCommentsModal and see all the PR comments.
  • Clicking on the 'add comment' button triggers the addPullRequestCommentsModal which uses addNewPullRequestComment method from the githubSDK.
  • After the comment is posted, a notification along with the comments URL is sent to the channel.

image

Clone this wiki locally