Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dessant
committed
Jan 23, 2019
0 parents
commit 8a448b8
Showing
15 changed files
with
5,735 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# The ID of your GitHub App | ||
APP_ID= | ||
WEBHOOK_SECRET=development | ||
|
||
# Use `trace` to get verbose logging or `info` to show less | ||
LOG_LEVEL=debug | ||
|
||
# Go to https://smee.io/new and set this to the URL that you are redirected to | ||
# WEBHOOK_PROXY_URL= |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.data/ | ||
.env | ||
*.pem | ||
|
||
node_modules/ | ||
|
||
npm-debug.log | ||
yarn-debug.log | ||
yarn-error.log | ||
.yarn-integrity |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8.12.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
singleQuote: true | ||
bracketSpacing: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: node_js | ||
|
||
cache: yarn | ||
|
||
script: "" | ||
|
||
deploy: | ||
- provider: npm | ||
email: $NPM_EMAIL | ||
api_key: $NPM_TOKEN | ||
on: | ||
tags: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Armin Sebastian | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Label Actions | ||
|
||
[![Build Status](https://img.shields.io/travis/com/dessant/label-actions/master.svg)](https://travis-ci.com/dessant/label-actions) | ||
[![Version](https://img.shields.io/npm/v/label-actions.svg?colorB=007EC6)](https://www.npmjs.com/package/label-actions) | ||
|
||
Label Actions is a GitHub App built with [Probot](https://github.com/probot/probot) | ||
that performs actions when issues or pull requests are labeled or unlabeled. | ||
|
||
## Supporting the Project | ||
|
||
The continued development of Label Actions is made possible | ||
thanks to the support of awesome backers. If you'd like to join them, | ||
please consider contributing with [Patreon](https://www.patreon.com/dessant), | ||
[PayPal](https://www.paypal.me/ArminSebastian) or [Bitcoin](https://goo.gl/uJUAaU). | ||
|
||
## How It Works | ||
|
||
The app performs certain actions when an issue or pull request | ||
is labeled or unlabeled. No action is taken by default and the app | ||
must be configured. The following actions are supported: | ||
|
||
* Post a comment (`comment` option) | ||
* Close (`close` option) | ||
* Reopen (`open` option) | ||
* Lock with an optional lock reason (`lock` and `lockReason` options) | ||
* Unlock (`unlock` option) | ||
|
||
## Usage | ||
|
||
1. **[Install the GitHub App](https://github.com/apps/label-actions)** | ||
for the intended repositories | ||
2. Create `.github/label-actions.yml` based on the template below | ||
3. Start labeling issues and pull requests | ||
|
||
鈿狅笍 **If possible, install the app only for select repositories. | ||
Do not leave the `All repositories` option selected, unless you intend | ||
to use the app for all current and future repositories.** | ||
|
||
#### Configuration | ||
|
||
Create `.github/label-actions.yml` in the default branch to enable the app, | ||
or add it at the same file path to a special repository named `.github`. | ||
Configure the app by editing the following template: | ||
|
||
```yaml | ||
# Configuration for Label Actions - https://github.com/dessant/label-actions | ||
|
||
# Specify actions for issues and pull requests | ||
actions: | ||
# Actions taken when the `heated` label is added | ||
heated: | ||
# Post a comment | ||
comment: > | ||
The thread has been temporarily locked. | ||
Please follow our community guidelines. | ||
# Lock the thread | ||
lock: true | ||
# Set a lock reason, such as `off-topic`, `too heated`, `resolved` or `spam` | ||
lockReason: "too heated" | ||
# Actions taken when the `heated` label is removed | ||
-heated: | ||
# Unlock the thread | ||
unlock: true | ||
|
||
# Optionally, specify configuration settings just for issues | ||
issues: | ||
actions: | ||
feature: | ||
# Post a comment, `{issue-author}` is an optional placeholder | ||
comment: > | ||
:wave: @{issue-author}, please use our idea board to request new features. | ||
# Close the issue | ||
close: true | ||
-wontfix: | ||
# Reopen the issue | ||
open: true | ||
|
||
# Optionally, specify configuration settings just for pull requests | ||
pulls: | ||
actions: | ||
pizzazz: | ||
comment: > | ||
![](https://i.imgur.com/WuduJNk.jpg) | ||
# Limit to only `issues` or `pulls` | ||
# only: issues | ||
|
||
# Repository to extend settings from | ||
# _extends: repo | ||
``` | ||
|
||
## Deployment | ||
|
||
See [docs/deploy.md](docs/deploy.md) if you would like to run your own | ||
instance of this app. | ||
|
||
## License | ||
|
||
Copyright (c) 2019 Armin Sebastian | ||
|
||
This software is released under the terms of the MIT License. | ||
See the [LICENSE](LICENSE) file for further information. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
A GitHub App that performs actions when issues or pull requests are labeled or unlabeled. | ||
|
||
## How It Works | ||
|
||
The app performs certain actions when an issue or pull request is labeled or unlabeled. No action is taken by default and the app must be configured. The following actions are supported: | ||
|
||
* Post a comment (`comment` option) | ||
* Close (`close` option) | ||
* Reopen (`open` option) | ||
* Lock with an optional lock reason (`lock` and `lockReason` options) | ||
* Unlock (`unlock` option) | ||
|
||
## Usage | ||
|
||
1. **[Install the GitHub App](https://github.com/apps/label-actions)** for the intended repositories | ||
2. Create `.github/label-actions.yml` based on the template below | ||
3. Start labeling issues and pull requests | ||
|
||
鈿狅笍 **If possible, install the app only for select repositories. Do not leave the `All repositories` option selected, unless you intend to use the app for all current and future repositories.** | ||
|
||
#### Configuration | ||
|
||
Create `.github/label-actions.yml` in the default branch to enable the app, or add it at the same file path to a special repository named `.github`. Configure the app by editing the following template: | ||
|
||
```yaml | ||
# Configuration for Label Actions - https://github.com/dessant/label-actions | ||
|
||
# Specify actions for issues and pull requests | ||
actions: | ||
# Actions taken when the `heated` label is added | ||
heated: | ||
# Post a comment | ||
comment: > | ||
The thread has been temporarily locked. | ||
Please follow our community guidelines. | ||
# Lock the thread | ||
lock: true | ||
# Set a lock reason, such as `off-topic`, `too heated`, `resolved` or `spam` | ||
lockReason: "too heated" | ||
# Actions taken when the `heated` label is removed | ||
-heated: | ||
# Unlock the thread | ||
unlock: true | ||
|
||
# Optionally, specify configuration settings just for issues | ||
issues: | ||
actions: | ||
feature: | ||
# Post a comment, `{issue-author}` is an optional placeholder | ||
comment: > | ||
:wave: @{issue-author}, please use our idea board to request new features. | ||
# Close the issue | ||
close: true | ||
-wontfix: | ||
# Reopen the issue | ||
open: true | ||
|
||
# Optionally, specify configuration settings just for pull requests | ||
pulls: | ||
actions: | ||
pizzazz: | ||
comment: > | ||
![](https://i.imgur.com/WuduJNk.jpg) | ||
# Limit to only `issues` or `pulls` | ||
# only: issues | ||
|
||
# Repository to extend settings from | ||
# _extends: repo | ||
``` | ||
|
||
## Supporting the Project | ||
|
||
The continued development of Label Actions is made possible thanks to the support of awesome backers. If you'd like to join them, please consider contributing with [Patreon](https://www.patreon.com/dessant), [PayPal](https://www.paypal.me/ArminSebastian) or [Bitcoin](https://goo.gl/uJUAaU). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Deploying | ||
|
||
If you would like to run your own instance of this app, see the | ||
[docs for deployment](https://probot.github.io/docs/deployment/). | ||
|
||
This app requires these **Permissions & events** for the GitHub App: | ||
|
||
- Issues - **Read & Write** | ||
- [x] Check the box for **Issues** events | ||
- Pull requests - **Read & Write** | ||
- [x] Check the box for **Pull request** events | ||
- Repository metadata - **Read-only** | ||
- Single File - **Read-only** | ||
- Path: `.github/label-actions.yml` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"name": "label-actions", | ||
"version": "0.1.0", | ||
"description": "A GitHub App built with Probot that performs actions when issues or pull requests are labeled or unlabeled.", | ||
"author": "Armin Sebastian", | ||
"license": "MIT", | ||
"repository": { | ||
"url": "https://github.com/dessant/label-actions.git", | ||
"type": "git" | ||
}, | ||
"bugs": "https://github.com/dessant/label-actions/issues", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"start": "probot run ./src/index.js", | ||
"watch": "nodemon --exec 'yarn run start'", | ||
"update": "ncu --upgrade --upgradeAll && yarn", | ||
"push": "git push --follow-tags origin master", | ||
"release": "standard-version && yarn run push" | ||
}, | ||
"files": [ | ||
"docs", | ||
"src" | ||
], | ||
"dependencies": { | ||
"joi": "^14.3.1", | ||
"probot": "^7.5.0", | ||
"probot-config": "^1.0.1", | ||
"probot-messages": "^0.1.2", | ||
"uuid": "^3.3.2" | ||
}, | ||
"devDependencies": { | ||
"nodemon": "^1.18.9", | ||
"npm-check-updates": "^2.15.0", | ||
"prettier": "^1.16.0", | ||
"smee-client": "^1.0.2", | ||
"standard-version": "^4.4.0" | ||
}, | ||
"engines": { | ||
"node": ">=8.12.0" | ||
}, | ||
"keywords": [ | ||
"github", | ||
"issues", | ||
"pull requests", | ||
"label", | ||
"comment", | ||
"close", | ||
"lock", | ||
"label issues", | ||
"close issues", | ||
"lock issues", | ||
"automation", | ||
"github app", | ||
"probot", | ||
"probot app", | ||
"bot" | ||
] | ||
} |
Oops, something went wrong.