From 55817f0c5549646915bc69e4ea8b12f437e6c21e Mon Sep 17 00:00:00 2001 From: Kentaro Matsushita Date: Sat, 23 Feb 2019 00:17:41 +0900 Subject: [PATCH 1/2] Add Dockerfile to support for GitHub Actions --- Dockerfile | 18 ++++++++++++++++++ package-lock.json | 16 ++++++++-------- package.json | 3 ++- 3 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d6c522f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:10 + +LABEL "com.github.actions.name"="Auto Assign" +LABEL "com.github.actions.description"="Add reviewers/assignees to pull requests when pull requests are opened." +LABEL "com.github.actions.icon"="user-plus" +LABEL "com.github.actions.color"="blue" + +LABEL "repository"="https://github.com/kentaro-m/auto-assign" +LABEL "homepage"="https://probot.github.io/apps/auto-assign/" +LABEL "maintainer"="Kentaro Matsushita" + +ENV PATH=$PATH:/app/node_modules/.bin +WORKDIR /app +COPY . . +RUN npm install --production && npm run build + +ENTRYPOINT ["probot", "receive"] +CMD ["/app/lib/index.js"] diff --git a/package-lock.json b/package-lock.json index 9334d5b..859011e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8233,14 +8233,14 @@ } }, "tslint-eslint-rules": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/tslint-eslint-rules/-/tslint-eslint-rules-5.3.1.tgz", - "integrity": "sha512-qq2H/AU/FlFbQJKXuxhtIk+ni/nQu9jHHhsFKa6hnA0/n3zl1/RWRc3TVFlL8HfWFMzkST350VeTrFpy1u4OUg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/tslint-eslint-rules/-/tslint-eslint-rules-5.4.0.tgz", + "integrity": "sha512-WlSXE+J2vY/VPgIcqQuijMQiel+UtmXS+4nvK4ZzlDiqBfXse8FAvkNnTcYhnQyOTW5KFM+uRRGXxYhFpuBc6w==", "dev": true, "requires": { "doctrine": "0.7.2", "tslib": "1.9.0", - "tsutils": "2.8.0" + "tsutils": "^3.0.0" }, "dependencies": { "doctrine": { @@ -8272,12 +8272,12 @@ "dev": true }, "tsutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.8.0.tgz", - "integrity": "sha1-AWAXNymzvxOGKN0UoVN+AIUdgUo=", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.8.0.tgz", + "integrity": "sha512-XQdPhgcoTbCD8baXC38PQ0vpTZ8T3YrE+vR66YIj/xvDt1//8iAhafpIT/4DmvzzC1QFapEImERu48Pa01dIUA==", "dev": true, "requires": { - "tslib": "^1.7.1" + "tslib": "^1.8.1" } } } diff --git a/package.json b/package.json index 3f45987..ea7119b 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ "ts-jest": "^24.0.0", "tslint": "^5.11.0", "tslint-config-prettier": "^1.13.0", - "tslint-config-standard": "^7.1.0" + "tslint-config-standard": "^7.1.0", + "tslint-eslint-rules": "^5.4.0" }, "engines": { "node": ">= 8.3.0" From ca7f112d714708737983f9db01417910c4b6d3f1 Mon Sep 17 00:00:00 2001 From: Kentaro Matsushita Date: Sat, 23 Feb 2019 12:47:13 +0900 Subject: [PATCH 2/2] Add a description that how to run the app using GitHub Actions --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 52c3013..3e16ef8 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,21 @@ WEBHOOK_SECRET=development PRIVATE_KEY_PATH=.data/private-key.pem ``` +### GitHub Actions +Add `.github/main.workflow` to the repository you want to run the app. + +```hcl +workflow "Add reviewers/assignees to Pull Requests" { + on = "pull_request" + resolves = "Auto Assign" +} + +action "Auto Assign" { + uses = "kentaro-m/auto-assign@master" + secrets = ["GITHUB_TOKEN"] +} +``` + ## Contributing If you have suggestions for how `auto-assign` could be improved, or want to report a bug, open an issue! We'd love all and any contributions.