Created
December 20, 2017 01:03
-
-
Save henry40408/d86cf31dca80f410114fdc4b3bd4f93b to your computer and use it in GitHub Desktop.
jiminycricket/pr-review-submit-unassign
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/jiminycricket/pr-review-submit-unassign/blob/5b3bf2e64c6417919d53c4966f50d5c8bb97e91e/index.js#L8-L19 | |
const { github } = context | |
const userConfig = await context.config('pr_review_submit_unassign.yml') | |
const config = Object.assign({}, defaultConfig, userConfig) | |
const { pull_request, review } = context.payload | |
const pullRequestOwner = pull_request.user.login | |
const reviwer = review.user.login | |
// NOTE not assign pull request owner if review is submitted by owner | |
if (pullRequestOwner === reviwer) { | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment