HTTP server route handler:
Call Kubernetes REST client directly:
| #!/bin/sh | |
| # shellcheck shell=dash | |
| # If you need an offline install, or you'd prefer to run the binary directly, head to | |
| # https://github.com/DeterminateSystems/nix-installer/releases then pick the version and platform | |
| # most appropriate for your deployment target. | |
| # | |
| # This is just a little script that selects and downloads the right `nix-installer`. It does | |
| # platform detection, downloads the installer, and runs it; that's it. | |
| # |
| #!/bin/sh | |
| # This script installs the Nix package manager on your system by | |
| # downloading a binary distribution and running its installer script | |
| # (which in turn creates and populates /nix). | |
| { # Prevent execution if this script was only partially downloaded | |
| oops() { | |
| echo "$0:" "$@" >&2 | |
| exit 1 |
| #!/bin/sh | |
| # chezmoi install script | |
| # contains code from and inspired by | |
| # https://github.com/client9/shlib | |
| # https://github.com/goreleaser/godownloader | |
| set -e | |
| BINDIR="${BINDIR:-./bin}" |
HTTP server route handler:
Call Kubernetes REST client directly:
| // https://github.com/jiminycricket/pr-review-submit-unassign/blob/5b3bf2e64c6417919d53c4966f50d5c8bb97e91e/index.js#L21-L46 | |
| let comment = '' | |
| if (config.unassignReviewer) { | |
| const params = context.issue({ body: { assignees: [reviwer] } }) | |
| await github.issues.removeAssigneesFromIssue(params) | |
| comment += config.unassignTemplate.replace('{reviwer}', reviwer) | |
| } |
| // 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 |
| // https://github.com/henry40408/assign-in-comment/blob/master/index.js#L3-L5 | |
| module.exports = robot => { | |
| robot.on('pull_request.opened', context => assignInComment(robot, context)) | |
| robot.on('pull_request.edited', context => assignInComment(robot, context)) | |
| } |
| // https://github.com/jiminycricket/pr-review-submit-unassign/blob/5b3bf2e64c6417919d53c4966f50d5c8bb97e91e/index.js#L3-L5 | |
| module.exports = robot => { | |
| robot.on('pull_request_review.submitted', assignAfterReviewSubmitted) | |
| } |
| // https://github.com/jiminycricket/pr-review-submit-unassign/blob/5b3bf2e64c6417919d53c4966f50d5c8bb97e91e/index.js | |
| const defaultConfig = require('./lib/defaultConfig') | |
| module.exports = robot => { | |
| robot.on('pull_request_review.submitted', assignAfterReviewSubmitted) | |
| } | |
| async function assignAfterReviewSubmitted (context) { | |
| const { github } = context |