mirror of
https://github.com/zhigang1992/probot.github.io.git
synced 2026-01-12 22:49:53 +08:00
Merge branch 'master' into robot-to-app
This commit is contained in:
@@ -37,7 +37,7 @@ Work in Progress pull request are also welcome to get feedback early on, or if t
|
||||
|
||||
## Adding your app
|
||||
|
||||
You can add your app to the [website](https://probot.github.io/apps/) by creating a [new file in `_apps/`](https://github.com/probot/probot.github.io/new/master/_apps?filename=your-app-name.md) with this template:
|
||||
You can add your app to the [website](https://probot.github.io/apps/) by creating a [new file in `_apps/`](https://github.com/probot/probot.github.io/new/master?filename=_apps/your-app-name.md) with this template:
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
---
|
||||
title: CI Reporter
|
||||
description: Pastes the error output of a failing build into the relevant PR.
|
||||
slug: ci-reporter
|
||||
screenshots:
|
||||
- https://user-images.githubusercontent.com/10660468/36135324-78809222-1058-11e8-99cd-6cc100971066.png
|
||||
authors:
|
||||
- JasonEtco
|
||||
repository: JasonEtco/ci-reporter
|
||||
host: https://ci-reporter-etc.herokuapp.com
|
||||
stars: 34
|
||||
updated: 2018-06-01 16:38:59 UTC
|
||||
installations: 65
|
||||
organizations:
|
||||
- ant-design
|
||||
- ReactiveX
|
||||
- explosion
|
||||
- semantic-release
|
||||
- thibmaek
|
||||
- probot
|
||||
- octokit
|
||||
- offu
|
||||
- Radarr
|
||||
- gillesdemey
|
||||
---
|
||||
## Usage
|
||||
|
||||
Simply [install the app](https://github.com/apps/ci-reporter) and watch the magic happen as your Pull Requests trigger failure statuses.
|
||||
|
||||
## How it works
|
||||
|
||||
When a build fails, the CI provider will tell GitHub (via a status). GitHub then tells **ci-reporter** about a failed status, and it'll find the part of the build that failed, then comment back on the PR.
|
||||
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
You don't need any configuration for this to work in your project but you can customize a few things to fit your needs. You can create a `.github/ci-reporter.yml` file:
|
||||
|
||||
```yml
|
||||
# Set to false to create a new comment instead of updating the app's first one
|
||||
updateComment: true
|
||||
|
||||
# Use a custom string, or set to false to disable
|
||||
before: "✨ Good work on this PR so far! ✨ Unfortunately, the [{{ provider }} build]({{ targetUrl }}) is failing as of {{ commit }}. Here's the output:"
|
||||
|
||||
# Use a custom string, or set to false to disable
|
||||
after: "I'm sure you can fix it! If you need help, don't hesitate to ask a maintainer of the project!"
|
||||
```
|
||||
|
||||
If you need more configuration, please [let me know in a new issue](https://github.com/JasonEtco/ci-reporter/issues/new?title=[Config]&body=Can%20you%20please%20add%20the%20___%20config%20option).
|
||||
|
||||
|
||||
|
||||
## Does it work with _____?
|
||||
|
||||
**ci-reporter** currently supports TravisCI and CircleCI. If you're interested in seeing support for another CI tool, please [open an issue](https://github.com/JasonEtco/ci-reporter/issues/new)!
|
||||
46
_apps/close-issue.md
Normal file
46
_apps/close-issue.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Close Issue
|
||||
description: Comment on the issues that do not include some contents then close them.
|
||||
slug: close-issue-app
|
||||
screenshots:
|
||||
- https://raw.githubusercontent.com/offu/close-issue-app/master/screenshot.png
|
||||
authors:
|
||||
- helloqiu
|
||||
- whtsky
|
||||
repository: offu/close-issue-app
|
||||
host: https://close-issue-app.herokuapp.com
|
||||
stars: 2
|
||||
updated: 2018-06-26 16:32:11 UTC
|
||||
installations: 2
|
||||
organizations:
|
||||
- offu
|
||||
- helloqiu
|
||||
---
|
||||
[](https://travis-ci.org/offu/close-issue-app)
|
||||
[](https://codecov.io/gh/offu/close-issue-app)
|
||||
## What It Does
|
||||
The app will check new opened and reopened issues if they include some specific contents. Issues not passed will be commented then closed.
|
||||
## Usage
|
||||
1. Create a `.github/issue-close-app.yml` file in your repo. Here's an example:
|
||||
``` yaml
|
||||
# Comment that will be sent if an issue is judged to be closed
|
||||
comment: "This issue is closed because it does not meet our issue template. Please read it."
|
||||
issueConfigs:
|
||||
# There can be several configs for different kind of issues.
|
||||
- content:
|
||||
# Example 1: bug report
|
||||
- "Expected Behavior"
|
||||
- "Current Behavior"
|
||||
- "Steps to Reproduce"
|
||||
- "Detailed Description"
|
||||
- content:
|
||||
# Example 2: feature request
|
||||
- "Motivation / Use Case"
|
||||
- "Expected Behavior"
|
||||
- "Other Information"
|
||||
# The issue is judged to be legal if it includes all keywords from any of these two configs.
|
||||
# Or it will be closed by the app.
|
||||
```
|
||||
The config file is **required** to run this app. And there is no **default config**. If the app can not find a valid config file, it will ignore requests from the repo.
|
||||
2. Install the [close-issue-app](https://github.com/apps/close-issue-app).
|
||||
3. Enjoy!
|
||||
@@ -9,20 +9,20 @@ authors:
|
||||
- ahmed-taj
|
||||
repository: ahmed-taj/commitlint-bot
|
||||
host: https://probot-commitlint.now.sh
|
||||
stars: 65
|
||||
stars: 69
|
||||
updated: 2018-04-28 00:10:53 UTC
|
||||
installations: 41
|
||||
installations: 47
|
||||
organizations:
|
||||
- pedronauck
|
||||
- caarlos0
|
||||
- TECLIB
|
||||
- ajsb85
|
||||
- algolia
|
||||
- flyve-mdm
|
||||
- christophehurpeau
|
||||
- ahmed-taj
|
||||
- upfrontIO
|
||||
- blackxored
|
||||
- CharlyJazz
|
||||
- christophehurpeau
|
||||
- u3u
|
||||
- theo4u
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
|
||||
10
_apps/dco.md
10
_apps/dco.md
@@ -4,23 +4,23 @@ description: Enforce the DCO on Pull Requests
|
||||
slug: dco
|
||||
screenshots:
|
||||
- https://cloud.githubusercontent.com/assets/173/24482273/a35dc23e-14b5-11e7-9371-fd241873e2c3.png
|
||||
stars: 56
|
||||
stars: 64
|
||||
authors:
|
||||
- bkeepers
|
||||
repository: probot/dco
|
||||
updated: 2018-06-01 16:48:34 UTC
|
||||
updated: 2018-06-26 14:25:40 UTC
|
||||
host: https://probot-dco.herokuapp.com
|
||||
installations: 199
|
||||
installations: 222
|
||||
organizations:
|
||||
- prometheus
|
||||
- hyperledger
|
||||
- ory
|
||||
- fluent
|
||||
- gradle
|
||||
- pi-hole
|
||||
- src-d
|
||||
- pi-hole
|
||||
- vitessio
|
||||
- jaegertracing
|
||||
- openebs
|
||||
- envoyproxy
|
||||
---
|
||||
|
||||
|
||||
10
_apps/dep.md
10
_apps/dep.md
@@ -9,20 +9,20 @@ authors:
|
||||
- ahmed-taj
|
||||
repository: ahmed-taj/dep
|
||||
host: https://probot-dep.now.sh
|
||||
stars: 32
|
||||
updated: 2018-05-19 13:32:07 UTC
|
||||
installations: 56
|
||||
stars: 35
|
||||
updated: 2018-06-26 12:46:51 UTC
|
||||
installations: 60
|
||||
organizations:
|
||||
- probot
|
||||
- Laravel-Backpack
|
||||
- JabRef
|
||||
- thefrontside
|
||||
- timvideos
|
||||
- tunnckoCore
|
||||
- ZEPL
|
||||
- gaocegege
|
||||
- TECLIB
|
||||
- cmfcmf
|
||||
- mithro
|
||||
- decidim
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -12,8 +12,9 @@ repository: raulriera/probot-duplicator
|
||||
host: https://rapid-sousaphone.glitch.me/
|
||||
stars: 2
|
||||
updated: 2018-04-21 03:11:27 UTC
|
||||
installations: 3
|
||||
organizations: []
|
||||
installations: 4
|
||||
organizations:
|
||||
- opensourcecities
|
||||
---
|
||||
|
||||
# Probot: Duplicator
|
||||
|
||||
@@ -8,13 +8,15 @@ authors:
|
||||
- koddsson
|
||||
repository: koddsson/eslint-disable-probot
|
||||
host: https://eslint-disable-probot.herokuapp.com
|
||||
stars: 11
|
||||
stars: 13
|
||||
updated: 2018-04-17 09:00:30 UTC
|
||||
installations: 8
|
||||
installations: 10
|
||||
organizations:
|
||||
- thibmaek
|
||||
- levibostian
|
||||
- Favna
|
||||
- ID-BPHC
|
||||
- Spudnik-Group
|
||||
- odykyi
|
||||
---
|
||||
## Usage
|
||||
|
||||
@@ -11,10 +11,12 @@ repository: rsarky/helpr
|
||||
host: https://evening-depths-50399.herokuapp.com
|
||||
stars: 4
|
||||
updated: 2018-04-20 09:11:34 UTC
|
||||
installations: 5
|
||||
installations: 8
|
||||
organizations:
|
||||
- Glavin001
|
||||
- Unibeautify
|
||||
- DarkPacks
|
||||
- Polystream
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -10,18 +10,18 @@ repository: erickzhao/invite-contributors
|
||||
stars: 20
|
||||
updated: 2018-05-05 14:10:11 UTC
|
||||
host: https://vast-stream-78160.herokuapp.com
|
||||
installations: 18
|
||||
installations: 21
|
||||
organizations:
|
||||
- nteract
|
||||
- stylelint
|
||||
- Laravel-Backpack
|
||||
- cla-assistant
|
||||
- github-modules
|
||||
- react-native-sensors
|
||||
- contentful-userland
|
||||
- flyve-mdm
|
||||
- LibreTime
|
||||
- aethonanbot
|
||||
- baas-cloud
|
||||
- divyenduz
|
||||
- levibostian
|
||||
---
|
||||
|
||||
# invite-contributors
|
||||
|
||||
@@ -9,12 +9,13 @@ authors:
|
||||
repository: riyadhalnur/issuelabeler
|
||||
host: https://1th3h69bkc.execute-api.ap-southeast-1.amazonaws.com/production
|
||||
stars: 2
|
||||
updated: 2018-05-23 07:39:31 UTC
|
||||
installations: 7
|
||||
updated: 2018-06-26 14:22:29 UTC
|
||||
installations: 8
|
||||
organizations:
|
||||
- pymc-devs
|
||||
- nodeschool
|
||||
- GameServerManagers
|
||||
- aonez
|
||||
- nodeschool
|
||||
- RMHogervorst
|
||||
- cms-gem-daq-project
|
||||
- dibosh
|
||||
|
||||
@@ -10,10 +10,15 @@ repository: swinton/linter-alex
|
||||
host: https://linter-alex.herokuapp.com
|
||||
stars: 20
|
||||
updated: 2018-05-24 13:26:09 UTC
|
||||
installations: 4
|
||||
installations: 9
|
||||
organizations:
|
||||
- git-for-windows
|
||||
- probot
|
||||
- PennyDreadfulMTG
|
||||
- 4cm4k1
|
||||
- l0s
|
||||
- silasary
|
||||
- gitgitgadget
|
||||
---
|
||||
|
||||
# Probot: Linter Alex
|
||||
|
||||
@@ -8,15 +8,15 @@ authors:
|
||||
- dessant
|
||||
repository: dessant/lock-threads
|
||||
host: https://probot-lock-threads.glitch.me
|
||||
stars: 35
|
||||
updated: 2018-05-30 01:22:26 UTC
|
||||
installations: 51
|
||||
stars: 38
|
||||
updated: 2018-06-27 08:55:13 UTC
|
||||
installations: 66
|
||||
organizations:
|
||||
- Homebrew
|
||||
- facebook
|
||||
- jquery
|
||||
- atom
|
||||
- ReactTraining
|
||||
- ant-design
|
||||
- erikras
|
||||
- babel
|
||||
- webtorrent
|
||||
|
||||
@@ -8,9 +8,9 @@ authors:
|
||||
- raulriera
|
||||
repository: raulriera/probot-minimum-reviews
|
||||
host: https://horn-produce.glitch.me/
|
||||
stars: 5
|
||||
updated: 2018-04-21 03:11:32 UTC
|
||||
installations: 6
|
||||
stars: 6
|
||||
updated: 2018-06-15 01:52:55 UTC
|
||||
installations: 7
|
||||
organizations:
|
||||
- divyenduz
|
||||
- aidminutes
|
||||
|
||||
@@ -9,12 +9,13 @@ authors:
|
||||
- dessant
|
||||
repository: dessant/move-issues
|
||||
host: https://probot-move-issues.glitch.me
|
||||
stars: 16
|
||||
updated: 2018-06-01 13:07:06 UTC
|
||||
installations: 47
|
||||
stars: 18
|
||||
updated: 2018-06-24 12:35:24 UTC
|
||||
installations: 59
|
||||
organizations:
|
||||
- atom
|
||||
- Homebrew
|
||||
- flutter
|
||||
- home-assistant
|
||||
- kivy
|
||||
- tidyverse
|
||||
@@ -22,7 +23,6 @@ organizations:
|
||||
- r-lib
|
||||
- ethereum
|
||||
- probot
|
||||
- GameServerManagers
|
||||
---
|
||||
|
||||
A GitHub App that moves issues between repositories.
|
||||
|
||||
@@ -9,20 +9,20 @@ authors:
|
||||
- lee-dohm
|
||||
repository: probot/no-response
|
||||
host: https://probot-no-response.herokuapp.com
|
||||
stars: 28
|
||||
stars: 31
|
||||
updated: 2018-04-13 15:51:35 UTC
|
||||
installations: 84
|
||||
installations: 92
|
||||
organizations:
|
||||
- Homebrew
|
||||
- facebook
|
||||
- prettier
|
||||
- flutter
|
||||
- webtorrent
|
||||
- ethereum
|
||||
- standard
|
||||
- kivy
|
||||
- eggjs
|
||||
- wireapp
|
||||
- explosion
|
||||
- aws
|
||||
---
|
||||
|
||||
Automatically closes Issues where the author hasn't responded to a request for more information.
|
||||
|
||||
@@ -11,12 +11,13 @@ repository: swinton/probot-ooo
|
||||
host: https://probot-ooo.herokuapp.com
|
||||
stars: 11
|
||||
updated: 2018-01-06 15:08:10 UTC
|
||||
installations: 9
|
||||
installations: 11
|
||||
organizations:
|
||||
- CachetHQ
|
||||
- Laravel-Backpack
|
||||
- JasonEtco
|
||||
- karthik
|
||||
- matthewmccullough
|
||||
- JasonEtco
|
||||
- SuriyaaKudoIsc
|
||||
- BirkhoffLee
|
||||
---
|
||||
|
||||
@@ -12,7 +12,7 @@ repository: evenchange4/gh-polls-bot
|
||||
host: https://gh-polls-bot.now.sh
|
||||
stars: 131
|
||||
updated: 2018-01-15 01:35:10 UTC
|
||||
installations: 125
|
||||
installations: 139
|
||||
organizations:
|
||||
- apex
|
||||
- dawnlabs
|
||||
@@ -21,9 +21,9 @@ organizations:
|
||||
- jaegertracing
|
||||
- ahmetb
|
||||
- detailyang
|
||||
- RasaHQ
|
||||
- terkelg
|
||||
- probot
|
||||
- hql287
|
||||
---
|
||||
|
||||
# GitHub Polls Bot
|
||||
|
||||
46
_apps/pr-triage.md
Normal file
46
_apps/pr-triage.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: PR Triage
|
||||
description: Triage pull request
|
||||
slug: pr-triage
|
||||
screenshots:
|
||||
- https://user-images.githubusercontent.com/1587053/35917561-f4928e02-0c51-11e8-95d3-81b4f44ed6d2.png
|
||||
authors:
|
||||
- sotayamashita
|
||||
repository: pr-triage/pr-triage
|
||||
host: https://pr-triage.glitch.me
|
||||
stars: 2
|
||||
updated: 2018-06-27 07:18:35 UTC
|
||||
installations: 2
|
||||
organizations:
|
||||
- pr-triage
|
||||
---
|
||||
|
||||
## Install
|
||||
|
||||
PRTriage does **"NOT"** have permission to `Read & Write` your code :see_no_evil:. For more details, see Permission and Subscribe section. If you have any question, please free to ask us via [creating an issue](https://github.com/pr-triage/pr-triage/issues/new?labels=question).
|
||||
|
||||
1. :runner: Go to [PRTriage App Page](https://github.com/apps/pr-triage)
|
||||
1. :rocket: Click **Install**
|
||||
1. :mag: Please choose a repository
|
||||
1. :sparkles: That's it.
|
||||
|
||||
|
||||
## How it works
|
||||
|
||||
<p>
|
||||
<img src="https://user-images.githubusercontent.com/1587053/35917561-f4928e02-0c51-11e8-95d3-81b4f44ed6d2.png" width="100%">
|
||||
</p>
|
||||
|
||||
- Do nothing if your title of PR starts from `WIP`, `[WIP]` or `WIP:`.
|
||||
- Add a `PR: unreviewed` label if your PR does not have any reviews for latest commit.
|
||||
- Add a `PR: reviewed-changes-requested` label if your PR have reviewed and got **Change request** for latest commit.
|
||||
- Add a `PR: review-approved` label if your PR have reviewed and got **Approve** for latest commit.
|
||||
|
||||
|
||||
## Permission & Subscribe event
|
||||
|
||||
Here are permission and event PRTriage is requested and subscribe:
|
||||
|
||||
- :x: **No** access to code
|
||||
- :white_check_mark: Read access to metadata
|
||||
- :white_check_mark: Read and write access to pull requests to create, add and remove labels PRTriage manipulate.
|
||||
@@ -8,16 +8,17 @@ authors:
|
||||
- issc29
|
||||
repository: issc29/probot-prevent-public-repos
|
||||
host: https://probot-prevent-public-repos.herokuapp.com
|
||||
stars: 8
|
||||
stars: 9
|
||||
updated: 2018-05-31 19:56:19 UTC
|
||||
installations: 26
|
||||
installations: 41
|
||||
organizations:
|
||||
- bkeepers
|
||||
- telusdigital
|
||||
- telus
|
||||
- Pivotal
|
||||
- logrhythm
|
||||
- engineersmy
|
||||
- eVisionSoftware
|
||||
- Pivotal
|
||||
- SEED-EA
|
||||
- savannahinformatics
|
||||
---
|
||||
|
||||
|
||||
45
_apps/pull.md
Normal file
45
_apps/pull.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Pull
|
||||
description: Keep your forks up-to-date.
|
||||
slug: pull
|
||||
screenshots:
|
||||
- https://user-images.githubusercontent.com/5880908/40864471-046ffcd2-65c2-11e8-83cb-706e24bde80d.png
|
||||
- https://user-images.githubusercontent.com/5880908/40864529-32647474-65c2-11e8-9cdd-d325f2d7a6e4.png
|
||||
authors:
|
||||
- wei
|
||||
repository: wei/pull
|
||||
host: https://pull.now.sh
|
||||
stars: 26
|
||||
updated: 2018-06-26 17:09:59 UTC
|
||||
installations: 10
|
||||
organizations:
|
||||
- wei
|
||||
---
|
||||
|
||||
Keep your forks up-to-date via automatic pull requests, merges, or hard resets.
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
1. A pull request is created when an upstream is updated (checks periodically).
|
||||
1. Pull requests can be automatically merged or hard reset to match upstream.
|
||||
|
||||
_Upstream must be in the same fork network_
|
||||
|
||||
|
||||
## Setup
|
||||
|
||||
:warning:**Before you start:** _Create a new branch if you have made changes to your fork's default (master) branch._
|
||||
|
||||
|
||||
### Basic setup (without config):
|
||||
|
||||
1. Run `git clone --mirror` to make a backup (Recommended if you have changes).
|
||||
1. Install **[ Pull app](https://github.com/apps/pull)**.
|
||||
1. With zero-configuration, Pull app will automatically watch and pull in upstream's default (master) branch to yours with **hard reset**.
|
||||
|
||||
:bulb:_Do NOT touch default (master) branch in any forks. Always create new branches to work on._
|
||||
|
||||
|
||||
-----
|
||||
For more advanced setup and customization, please visit [wei/pull](https://github.com/wei/pull#readme).
|
||||
70
_apps/reaction.md
Normal file
70
_apps/reaction.md
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: Reaction Comments
|
||||
description: Deletes +1 comments and educates users about GitHub reactions.
|
||||
slug: reaction
|
||||
screenshots:
|
||||
- https://raw.githubusercontent.com/dessant/reaction-comments/master/assets/screenshot.png
|
||||
authors:
|
||||
- dessant
|
||||
repository: dessant/reaction-comments
|
||||
host: https://probot-reaction-comments.glitch.me
|
||||
stars: 0
|
||||
updated: 2018-06-27 08:54:21 UTC
|
||||
installations: 3
|
||||
organizations:
|
||||
- kivy
|
||||
- OpenApprenticeFoundation
|
||||
---
|
||||
|
||||
A GitHub App that educates users about the correct use of GitHub reactions,
|
||||
and deletes new reaction comments, such as +1.
|
||||
|
||||
## How It Works
|
||||
|
||||
The app detects if a new comment consists solely of emojis and shortcodes
|
||||
used in GitHub reactions. A matching comment is either replaced
|
||||
with the message set in `reactionComment` and deleted after a day,
|
||||
or it is deleted immediately, if `reactionComment` is set to `false`.
|
||||
|
||||
## Usage
|
||||
|
||||
1. **[Install the GitHub App](https://github.com/apps/reaction)**
|
||||
2. Create `.github/reaction.yml` based on the template below
|
||||
|
||||
#### Configuration
|
||||
|
||||
Create `.github/reaction.yml` in the default branch to enable the app.
|
||||
The file can be empty, or it can override any of these default settings:
|
||||
|
||||
```yaml
|
||||
# Configuration for reaction-comments - https://github.com/dessant/reaction-comments
|
||||
|
||||
# Issues and pull requests with these labels accept reaction comments.
|
||||
# Set to `[]` to disable
|
||||
exemptLabels: []
|
||||
|
||||
# Replace matching comments with this message, `{user}` is a placeholder
|
||||
# for the comment author. Set to `false` to disable
|
||||
reactionComment: >
|
||||
:wave: @{user}, did you mean to use a [reaction](https://git.io/vhzhC) instead?
|
||||
|
||||
# Limit to only `issues` or `pulls`
|
||||
# only: issues
|
||||
|
||||
# Optionally, specify configuration settings just for `issues` or `pulls`
|
||||
# issues:
|
||||
# exemptLabels:
|
||||
# - party-parrot
|
||||
|
||||
# pulls:
|
||||
# reactionComment: false
|
||||
|
||||
# Repository to extend settings from
|
||||
# _extends: repo
|
||||
```
|
||||
|
||||
## Supporting the Project
|
||||
|
||||
The continued development of Reaction Comments 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).
|
||||
@@ -8,21 +8,21 @@ authors:
|
||||
- jbjonesjr
|
||||
- bkeepers
|
||||
repository: probot/reminders
|
||||
stars: 28
|
||||
updated: 2018-05-19 13:35:35 UTC
|
||||
stars: 31
|
||||
updated: 2018-06-26 14:27:03 UTC
|
||||
host: https://probot-reminders.herokuapp.com
|
||||
installations: 187
|
||||
installations: 204
|
||||
organizations:
|
||||
- eggjs
|
||||
- StevenBlack
|
||||
- chaijs
|
||||
- git-for-windows
|
||||
- thibmaek
|
||||
- devtools-html
|
||||
- probot
|
||||
- devtools-html
|
||||
- goreleaser
|
||||
- Laravel-Backpack
|
||||
- modo-studio
|
||||
- chrisbra
|
||||
---
|
||||
|
||||
Use the `/remind` slash command to set a reminder on any comment box on GitHub and you'll get a ping about it again when the reminder is due.
|
||||
|
||||
@@ -11,7 +11,7 @@ authors:
|
||||
repository: behaviorbot/request-info
|
||||
updated: 2018-04-20 15:24:30 UTC
|
||||
host: https://probot-request-info.herokuapp.com
|
||||
installations: 135
|
||||
installations: 140
|
||||
organizations:
|
||||
- webtorrent
|
||||
- standard
|
||||
|
||||
@@ -5,11 +5,11 @@ description: Replies to toxic comments with a maintainer designated reply and a
|
||||
slug: sentiment-bot
|
||||
screenshots:
|
||||
- https://user-images.githubusercontent.com/13410355/29323857-fcfe4b4e-8196-11e7-9a08-6184fd46edbb.png
|
||||
stars: 30
|
||||
stars: 31
|
||||
authors:
|
||||
- hiimbex
|
||||
repository: behaviorbot/sentiment-bot
|
||||
updated: 2018-04-13 17:43:17 UTC
|
||||
updated: 2018-06-21 18:27:58 UTC
|
||||
host: https://probot-sentiment-bot.herokuapp.com
|
||||
installations: 38
|
||||
organizations:
|
||||
@@ -18,8 +18,8 @@ organizations:
|
||||
- probot
|
||||
- MvvmCross
|
||||
- modo-studio
|
||||
- xcodeswift
|
||||
- jahirfiquitiva
|
||||
- xcodeswift
|
||||
- pliablepixels
|
||||
- u3u
|
||||
- behaviorbot
|
||||
|
||||
@@ -2,18 +2,17 @@
|
||||
title: Settings
|
||||
description: Pull Requests for repository settings
|
||||
slug: settings
|
||||
stars: 210
|
||||
stars: 212
|
||||
authors:
|
||||
- bkeepers
|
||||
repository: probot/settings
|
||||
screenshots:
|
||||
- https://user-images.githubusercontent.com/173/29472917-3fad9db0-841b-11e7-8f6d-a6c63052122b.png
|
||||
updated: 2018-05-19 13:33:44 UTC
|
||||
updated: 2018-06-26 14:25:22 UTC
|
||||
host: https://github-configurer.herokuapp.com
|
||||
installations: 150
|
||||
installations: 157
|
||||
organizations:
|
||||
- apollographql
|
||||
- CNXTEoEorg
|
||||
- denysdovhan
|
||||
- bkeepers
|
||||
- chaijs
|
||||
@@ -21,6 +20,7 @@ organizations:
|
||||
- probot
|
||||
- benbalter
|
||||
- Anahkiasen
|
||||
- tweag
|
||||
- TGMPA
|
||||
---
|
||||
|
||||
|
||||
@@ -7,20 +7,20 @@ screenshots:
|
||||
- https://user-images.githubusercontent.com/173/27765705-93f94940-5e7e-11e7-8527-3a91bb64ca70.png
|
||||
authors:
|
||||
- bkeepers
|
||||
stars: 393
|
||||
stars: 412
|
||||
repository: probot/stale
|
||||
updated: 2018-05-31 14:16:01 UTC
|
||||
updated: 2018-06-26 14:27:11 UTC
|
||||
host: https://probot-stale.herokuapp.com
|
||||
installations: 694
|
||||
installations: 845
|
||||
organizations:
|
||||
- atom
|
||||
- facebook
|
||||
- atom
|
||||
- Homebrew
|
||||
- sebastianbergmann
|
||||
- Shopify
|
||||
- Homebrew
|
||||
- Semantic-Org
|
||||
- nwjs
|
||||
- prettier
|
||||
- webtorrent
|
||||
- gohugoio
|
||||
- ethereum
|
||||
---
|
||||
|
||||
@@ -8,18 +8,18 @@ authors:
|
||||
- dessant
|
||||
repository: dessant/support-requests
|
||||
host: https://probot-support-requests.glitch.me
|
||||
stars: 10
|
||||
updated: 2018-06-01 13:22:01 UTC
|
||||
installations: 32
|
||||
stars: 11
|
||||
updated: 2018-06-27 08:56:08 UTC
|
||||
installations: 33
|
||||
organizations:
|
||||
- Homebrew
|
||||
- mui-org
|
||||
- kivy
|
||||
- wix
|
||||
- CachetHQ
|
||||
- nozzle
|
||||
- MinecraftForge
|
||||
- PHPOffice
|
||||
- wix
|
||||
- crate
|
||||
- Laravel-Backpack
|
||||
---
|
||||
|
||||
@@ -8,13 +8,13 @@ authors:
|
||||
- JasonEtco
|
||||
repository: JasonEtco/todo
|
||||
host: https://todo-github-app.now.sh
|
||||
stars: 133
|
||||
updated: 2018-06-01 18:20:57 UTC
|
||||
installations: 193
|
||||
stars: 136
|
||||
updated: 2018-06-27 06:08:37 UTC
|
||||
installations: 210
|
||||
organizations:
|
||||
- nteract
|
||||
- mas-cli
|
||||
- thibmaek
|
||||
- nteract
|
||||
- Laravel-Backpack
|
||||
- heinrichreimer
|
||||
- Radarr
|
||||
|
||||
@@ -13,20 +13,20 @@ authors:
|
||||
- olstenlarck
|
||||
repository: tunnckoCore/triage-new-issues
|
||||
host: https://triage-new-issues.now.sh
|
||||
stars: 7
|
||||
updated: 2018-05-21 16:42:29 UTC
|
||||
installations: 41
|
||||
stars: 9
|
||||
updated: 2018-06-26 14:36:50 UTC
|
||||
installations: 48
|
||||
organizations:
|
||||
- CachetHQ
|
||||
- Semantic-Org
|
||||
- Laravel-Backpack
|
||||
- Robdel12
|
||||
- xcodeswift
|
||||
- GameServerManagers
|
||||
- thefrontside
|
||||
- jahirfiquitiva
|
||||
- tunnckoCore
|
||||
- xcodeswift
|
||||
- eXist-db
|
||||
- red-eclipse
|
||||
- pymedusa
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ authors:
|
||||
repository: probot/unfurl
|
||||
host: http://probot-unfurl.herokuapp.com
|
||||
stars: 33
|
||||
updated: 2018-06-01 16:38:29 UTC
|
||||
installations: 76
|
||||
updated: 2018-06-26 14:25:18 UTC
|
||||
installations: 86
|
||||
organizations:
|
||||
- reactiveui
|
||||
- probot
|
||||
@@ -20,8 +20,8 @@ organizations:
|
||||
- wangzuo
|
||||
- thefrontside
|
||||
- jahirfiquitiva
|
||||
- arguiot
|
||||
- timvideos
|
||||
- getantibody
|
||||
---
|
||||
|
||||
When a link is found in a comment, this app will add more information to the bottom of the comment about the link.
|
||||
|
||||
@@ -11,11 +11,12 @@ repository: entendu/untrivializer
|
||||
host: https://puffy-aftermath.glitch.me
|
||||
stars: 6
|
||||
updated: 2017-12-15 23:13:31 UTC
|
||||
installations: 8
|
||||
installations: 9
|
||||
organizations:
|
||||
- red-eclipse
|
||||
- BlueBayTravel
|
||||
- StoDevX
|
||||
- OpenApprenticeFoundation
|
||||
- Kristinita
|
||||
- entendu
|
||||
---
|
||||
|
||||
@@ -11,7 +11,7 @@ authors:
|
||||
repository: behaviorbot/update-docs
|
||||
updated: 2018-02-19 01:59:35 UTC
|
||||
host: https://probot-update-docs.herokuapp.com
|
||||
installations: 27
|
||||
installations: 29
|
||||
organizations:
|
||||
- adonisjs
|
||||
- xcodeswift
|
||||
|
||||
@@ -6,13 +6,13 @@ screenshots:
|
||||
- https://user-images.githubusercontent.com/13410355/28288851-679f582a-6af5-11e7-8dd8-b85b6c33e16b.png
|
||||
- https://user-images.githubusercontent.com/13410355/28288547-5f83aa8e-6af4-11e7-9692-eb41d42431e2.png
|
||||
- https://user-images.githubusercontent.com/13410355/28289605-1ab81a76-6af8-11e7-8f78-6a1b3948df36.png
|
||||
stars: 31
|
||||
stars: 32
|
||||
authors:
|
||||
- hiimbex
|
||||
repository: behaviorbot/welcome
|
||||
updated: 2018-04-14 16:30:57 UTC
|
||||
updated: 2018-06-20 22:26:35 UTC
|
||||
host: https://probot-welcome.herokuapp.com
|
||||
installations: 161
|
||||
installations: 174
|
||||
organizations:
|
||||
- vuejs
|
||||
- electron
|
||||
@@ -20,10 +20,10 @@ organizations:
|
||||
- webtorrent
|
||||
- standard
|
||||
- kivy
|
||||
- veggiemonk
|
||||
- StevenBlack
|
||||
- CachetHQ
|
||||
- getinsomnia
|
||||
- electron-userland
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ screenshots:
|
||||
authors:
|
||||
- gr2m
|
||||
repository: gr2m/wip-bot
|
||||
stars: 148
|
||||
updated: 2018-05-26 04:55:34 UTC
|
||||
stars: 215
|
||||
updated: 2018-06-26 12:48:43 UTC
|
||||
host: https://wip-bot.now.sh
|
||||
installations: 572
|
||||
organizations:
|
||||
|
||||
@@ -15,10 +15,10 @@ Advanced:
|
||||
- docs/persistence.md
|
||||
- docs/best-practices.md
|
||||
Reference:
|
||||
- title: app
|
||||
url: "https://probot.github.io/api/latest/Application.html"
|
||||
- title: Application
|
||||
url: "https://probot.github.io/api/latest/classes/application.html"
|
||||
- title: context
|
||||
url: "https://probot.github.io/api/latest/Context.html"
|
||||
url: "https://probot.github.io/api/latest/classes/context.html"
|
||||
- title: context.github
|
||||
url: "http://octokit.github.io/rest.js/"
|
||||
- title: GitHub Webhook Events
|
||||
|
||||
Submodule _submodules/probot updated: afffca77e8...61393304f0
@@ -904,7 +904,7 @@ repository.</p>
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat May 19 2018 08:31:42 GMT-0500 (CDT) using the Minami theme.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 22:02:51 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
|
||||
@@ -720,7 +720,7 @@ expose HTTP endpoints</p>
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat May 19 2018 08:31:42 GMT-0500 (CDT) using the Minami theme.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 22:02:51 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
|
||||
@@ -175,7 +175,7 @@ module.exports = Context
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat May 19 2018 08:31:42 GMT-0500 (CDT) using the Minami theme.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 22:02:51 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
|
||||
@@ -276,7 +276,7 @@ robot.log.fatal("Goodbye, cruel world!");</code></pre>
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat May 19 2018 08:31:42 GMT-0500 (CDT) using the Minami theme.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 22:02:51 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat May 19 2018 08:31:42 GMT-0500 (CDT) using the Minami theme.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 22:02:51 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
|
||||
@@ -123,7 +123,7 @@ module.exports = logger
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat May 19 2018 08:31:42 GMT-0500 (CDT) using the Minami theme.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 22:02:51 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
|
||||
@@ -250,7 +250,7 @@ module.exports = (...args) => new Robot(...args)
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat May 19 2018 08:31:42 GMT-0500 (CDT) using the Minami theme.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 22:02:51 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
|
||||
319
api/7.0.0-typescript.4/application.js.html
Normal file
319
api/7.0.0-typescript.4/application.js.html
Normal file
@@ -0,0 +1,319 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>application.js - Documentation</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"></script>
|
||||
<script src="scripts/prettify/lang-css.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
||||
<label for="nav-trigger" class="navicon-button x">
|
||||
<div class="navicon"></div>
|
||||
</label>
|
||||
|
||||
<label for="nav-trigger" class="overlay"></label>
|
||||
|
||||
<nav>
|
||||
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#Application">Application</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#Context">Context</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#get">get</a></span></li>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">application.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [0, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var express = require("express");
|
||||
var promise_events_1 = require("promise-events");
|
||||
var context_1 = require("./context");
|
||||
var github_1 = require("./github");
|
||||
var logger_1 = require("./logger");
|
||||
var wrap_logger_1 = require("./wrap-logger");
|
||||
// Some events can't get an authenticated client (#382):
|
||||
function isUnauthenticatedEvent(context) {
|
||||
return !context.payload.installation ||
|
||||
(context.event === 'installation' && context.payload.action === 'deleted');
|
||||
}
|
||||
/**
|
||||
* The `app` parameter available to apps
|
||||
*
|
||||
* @property {logger} log - A logger
|
||||
*/
|
||||
var Application = /** @class */ (function () {
|
||||
function Application(options) {
|
||||
var opts = options || {};
|
||||
this.events = new promise_events_1.EventEmitter();
|
||||
this.log = wrap_logger_1.wrapLogger(logger_1.logger, logger_1.logger);
|
||||
this.app = opts.app;
|
||||
this.cache = opts.cache;
|
||||
this.catchErrors = opts.catchErrors;
|
||||
this.router = opts.router || express.Router(); // you can do this?
|
||||
}
|
||||
Application.prototype.receive = function (event) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/, Promise.all([
|
||||
this.events.emit('*', event),
|
||||
this.events.emit(event.event, event),
|
||||
this.events.emit(event.event + "." + event.payload.action, event),
|
||||
])];
|
||||
});
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Get an {@link http://expressjs.com|express} router that can be used to
|
||||
* expose HTTP endpoints
|
||||
*
|
||||
* @example
|
||||
* module.exports = app => {
|
||||
* // Get an express router to expose new HTTP endpoints
|
||||
* const route = app.route('/my-app');
|
||||
*
|
||||
* // Use any middleware
|
||||
* route.use(require('express').static(__dirname + '/public'));
|
||||
*
|
||||
* // Add a new route
|
||||
* route.get('/hello-world', (req, res) => {
|
||||
* res.end('Hello World');
|
||||
* });
|
||||
* };
|
||||
*
|
||||
* @param {string} path - the prefix for the routes
|
||||
* @returns {@link http://expressjs.com/en/4x/api.html#router|express.Router}
|
||||
*/
|
||||
Application.prototype.route = function (path) {
|
||||
if (path) {
|
||||
var router = express.Router();
|
||||
this.router.use(path, router);
|
||||
return router;
|
||||
}
|
||||
else {
|
||||
return this.router;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Listen for [GitHub webhooks](https://developer.github.com/webhooks/),
|
||||
* which are fired for almost every significant action that users take on
|
||||
* GitHub.
|
||||
*
|
||||
* @param {string} event - the name of the [GitHub webhook
|
||||
* event](https://developer.github.com/webhooks/#events). Most events also
|
||||
* include an "action". For example, the * [`issues`](
|
||||
* https://developer.github.com/v3/activity/events/types/#issuesevent)
|
||||
* event has actions of `assigned`, `unassigned`, `labeled`, `unlabeled`,
|
||||
* `opened`, `edited`, `milestoned`, `demilestoned`, `closed`, and `reopened`.
|
||||
* Often, your bot will only care about one type of action, so you can append
|
||||
* it to the event name with a `.`, like `issues.closed`.
|
||||
*
|
||||
* @param {Application~webhookCallback} callback - a function to call when the
|
||||
* webhook is received.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* app.on('push', context => {
|
||||
* // Code was just pushed.
|
||||
* });
|
||||
*
|
||||
* app.on('issues.opened', context => {
|
||||
* // An issue was just opened.
|
||||
* });
|
||||
*/
|
||||
Application.prototype.on = function (eventName, callback) {
|
||||
var _this = this;
|
||||
if (typeof eventName === 'string') {
|
||||
return this.events.on(eventName, function (event) { return __awaiter(_this, void 0, void 0, function () {
|
||||
var log, github, context, err_1;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
log = this.log.child({ name: 'event', id: event.id });
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
_a.trys.push([1, 7, , 8]);
|
||||
github = void 0;
|
||||
if (!isUnauthenticatedEvent(event)) return [3 /*break*/, 3];
|
||||
return [4 /*yield*/, this.auth()];
|
||||
case 2:
|
||||
github = _a.sent();
|
||||
log.debug('`context.github` is unauthenticated. See https://probot.github.io/docs/github-api/#unauthenticated-events');
|
||||
return [3 /*break*/, 5];
|
||||
case 3: return [4 /*yield*/, this.auth(event.payload.installation.id, log)];
|
||||
case 4:
|
||||
github = _a.sent();
|
||||
_a.label = 5;
|
||||
case 5:
|
||||
context = new context_1.Context(event, github, log);
|
||||
return [4 /*yield*/, callback(context)];
|
||||
case 6:
|
||||
_a.sent();
|
||||
return [3 /*break*/, 8];
|
||||
case 7:
|
||||
err_1 = _a.sent();
|
||||
log.error({ err: err_1, event: event });
|
||||
if (!this.catchErrors) {
|
||||
throw err_1;
|
||||
}
|
||||
return [3 /*break*/, 8];
|
||||
case 8: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
}); });
|
||||
}
|
||||
else {
|
||||
eventName.forEach(function (e) { return _this.on(e, callback); });
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Authenticate and get a GitHub client that can be used to make API calls.
|
||||
*
|
||||
* You'll probably want to use `context.github` instead.
|
||||
*
|
||||
* **Note**: `app.auth` is asynchronous, so it needs to be prefixed with a
|
||||
* [`await`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
|
||||
* to wait for the magic to happen.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* module.exports = (app) => {
|
||||
* app.on('issues.opened', async context => {
|
||||
* const github = await app.auth();
|
||||
* });
|
||||
* };
|
||||
*
|
||||
* @param {number} [id] - ID of the installation, which can be extracted from
|
||||
* `context.payload.installation.id`. If called without this parameter, the
|
||||
* client wil authenticate [as the app](https://developer.github.com/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/#authenticating-as-a-github-app)
|
||||
* instead of as a specific installation, which means it can only be used for
|
||||
* [app APIs](https://developer.github.com/v3/apps/).
|
||||
*
|
||||
* @returns {Promise<github>} - An authenticated GitHub API client
|
||||
* @private
|
||||
*/
|
||||
Application.prototype.auth = function (id, log) {
|
||||
if (log === void 0) { log = this.log; }
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _this = this;
|
||||
var github, res;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
github = github_1.GitHubAPI({
|
||||
baseUrl: process.env.GHE_HOST && "https://" + process.env.GHE_HOST + "/api/v3",
|
||||
debug: process.env.LOG_LEVEL === 'trace',
|
||||
logger: log.child({ name: 'github', installation: String(id) })
|
||||
});
|
||||
if (!id) return [3 /*break*/, 2];
|
||||
return [4 /*yield*/, this.cache.wrap("app:" + id + ":token", function () {
|
||||
log.trace("creating token for installation");
|
||||
github.authenticate({ type: 'app', token: _this.app() });
|
||||
return github.apps.createInstallationToken({ installation_id: String(id) });
|
||||
}, { ttl: 60 * 59 })]; // Cache for 1 minute less than GitHub expiry
|
||||
case 1:
|
||||
res = _a.sent() // Cache for 1 minute less than GitHub expiry
|
||||
;
|
||||
github.authenticate({ type: 'token', token: res.data.token });
|
||||
return [3 /*break*/, 3];
|
||||
case 2:
|
||||
github.authenticate({ type: 'app', token: this.app() });
|
||||
_a.label = 3;
|
||||
case 3: return [2 /*return*/, github];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Application;
|
||||
}());
|
||||
exports.Application = Application;
|
||||
/**
|
||||
* Do the thing
|
||||
* @callback Application~webhookCallback
|
||||
* @param {Context} context - the context of the event that was triggered,
|
||||
* including `context.payload`, and helpers for extracting information from
|
||||
* the payload, which can be passed to GitHub API calls.
|
||||
*
|
||||
* ```js
|
||||
* module.exports = app => {
|
||||
* app.on('push', context => {
|
||||
* // Code was pushed to the repo, what should we do with it?
|
||||
* app.log(context);
|
||||
* });
|
||||
* };
|
||||
* ```
|
||||
*/
|
||||
/**
|
||||
* A [GitHub webhook event](https://developer.github.com/webhooks/#events) payload
|
||||
*
|
||||
* @typedef payload
|
||||
*/
|
||||
//# sourceMappingURL=application.js.map</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 21:35:41 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
233
api/7.0.0-typescript.4/context.js.html
Normal file
233
api/7.0.0-typescript.4/context.js.html
Normal file
@@ -0,0 +1,233 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>context.js - Documentation</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"></script>
|
||||
<script src="scripts/prettify/lang-css.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
||||
<label for="nav-trigger" class="navicon-button x">
|
||||
<div class="navicon"></div>
|
||||
</label>
|
||||
|
||||
<label for="nav-trigger" class="overlay"></label>
|
||||
|
||||
<nav>
|
||||
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#Application">Application</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#Context">Context</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#get">get</a></span></li>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">context.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [0, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var yaml = require("js-yaml");
|
||||
var path = require("path");
|
||||
/**
|
||||
* Helpers for extracting information from the webhook event, which can be
|
||||
* passed to GitHub API calls.
|
||||
*
|
||||
* @property {github} github - A GitHub API client
|
||||
* @property {payload} payload - The webhook event payload
|
||||
* @property {logger} log - A logger
|
||||
*/
|
||||
var Context = /** @class */ (function () {
|
||||
function Context(event, github, log) {
|
||||
Object.assign(this, event);
|
||||
this.id = event.id;
|
||||
this.github = github;
|
||||
this.log = log;
|
||||
}
|
||||
/**
|
||||
* Return the `owner` and `repo` params for making API requests against a
|
||||
* repository.
|
||||
*
|
||||
* @param {object} [object] - Params to be merged with the repo params.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* const params = context.repo({path: '.github/config.yml'})
|
||||
* // Returns: {owner: 'username', repo: 'reponame', path: '.github/config.yml'}
|
||||
*
|
||||
*/
|
||||
Context.prototype.repo = function (object) {
|
||||
var repo = this.payload.repository;
|
||||
if (!repo) {
|
||||
throw new Error('context.repo() is not supported for this webhook event.');
|
||||
}
|
||||
return Object.assign({
|
||||
owner: repo.owner.login || repo.owner.name,
|
||||
repo: repo.name
|
||||
}, object);
|
||||
};
|
||||
/**
|
||||
* Return the `owner`, `repo`, and `number` params for making API requests
|
||||
* against an issue or pull request. The object passed in will be merged with
|
||||
* the repo params.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* const params = context.issue({body: 'Hello World!'})
|
||||
* // Returns: {owner: 'username', repo: 'reponame', number: 123, body: 'Hello World!'}
|
||||
*
|
||||
* @param {object} [object] - Params to be merged with the issue params.
|
||||
*/
|
||||
Context.prototype.issue = function (object) {
|
||||
var payload = this.payload;
|
||||
return Object.assign({
|
||||
number: (payload.issue || payload.pull_request || payload).number
|
||||
}, this.repo(object));
|
||||
};
|
||||
Object.defineProperty(Context.prototype, "isBot", {
|
||||
/**
|
||||
* Returns a boolean if the actor on the event was a bot.
|
||||
* @type {boolean}
|
||||
*/
|
||||
get: function () {
|
||||
return this.payload.sender.type === 'Bot';
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
/**
|
||||
* Reads the app configuration from the given YAML file in the `.github`
|
||||
* directory of the repository.
|
||||
*
|
||||
* @example <caption>Contents of <code>.github/config.yml</code>.</caption>
|
||||
*
|
||||
* close: true
|
||||
* comment: Check the specs on the rotary girder.
|
||||
*
|
||||
* @example <caption>App that reads from <code>.github/config.yml</code>.</caption>
|
||||
*
|
||||
* // Load config from .github/config.yml in the repository
|
||||
* const config = await context.config('config.yml')
|
||||
*
|
||||
* if (config.close) {
|
||||
* context.github.issues.comment(context.issue({body: config.comment}))
|
||||
* context.github.issues.edit(context.issue({state: 'closed'}))
|
||||
* }
|
||||
*
|
||||
* @example <caption>Using a <code>defaultConfig</code> object.</caption>
|
||||
*
|
||||
* // Load config from .github/config.yml in the repository and combine with default config
|
||||
* const config = await context.config('config.yml', {comment: 'Make sure to check all the specs.'})
|
||||
*
|
||||
* if (config.close) {
|
||||
* context.github.issues.comment(context.issue({body: config.comment}));
|
||||
* context.github.issues.edit(context.issue({state: 'closed'}))
|
||||
* }
|
||||
*
|
||||
* @param {string} fileName - Name of the YAML file in the `.github` directory
|
||||
* @param {object} [defaultConfig] - An object of default config options
|
||||
* @return {Promise<Object>} - Configuration object read from the file
|
||||
*/
|
||||
Context.prototype.config = function (fileName, defaultConfig) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var params, res, config, err_1;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
params = this.repo({ path: path.posix.join('.github', fileName) });
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
_a.trys.push([1, 3, , 4]);
|
||||
return [4 /*yield*/, this.github.repos.getContent(params)];
|
||||
case 2:
|
||||
res = _a.sent();
|
||||
config = yaml.safeLoad(Buffer.from(res.data.content, 'base64').toString()) || {};
|
||||
return [2 /*return*/, Object.assign({}, defaultConfig, config)];
|
||||
case 3:
|
||||
err_1 = _a.sent();
|
||||
if (err_1.code === 404) {
|
||||
if (defaultConfig) {
|
||||
return [2 /*return*/, defaultConfig];
|
||||
}
|
||||
return [2 /*return*/, null];
|
||||
}
|
||||
else {
|
||||
throw err_1;
|
||||
}
|
||||
return [3 /*break*/, 4];
|
||||
case 4: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Context;
|
||||
}());
|
||||
exports.Context = Context;
|
||||
//# sourceMappingURL=context.js.map</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 21:35:41 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
663
api/7.0.0-typescript.4/global.html
Normal file
663
api/7.0.0-typescript.4/global.html
Normal file
@@ -0,0 +1,663 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Global - Documentation</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"></script>
|
||||
<script src="scripts/prettify/lang-css.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
||||
<label for="nav-trigger" class="navicon-button x">
|
||||
<div class="navicon"></div>
|
||||
</label>
|
||||
|
||||
<label for="nav-trigger" class="overlay"></label>
|
||||
|
||||
<nav>
|
||||
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#Application">Application</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#Context">Context</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#get">get</a></span></li>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">Global</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
|
||||
<header>
|
||||
|
||||
<h2>
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Members</h3>
|
||||
|
||||
|
||||
|
||||
<div class="section-members">
|
||||
<h4 class="name" id="Application"><span class="type-signature"></span>Application<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>The <code>app</code> parameter available to apps</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
|
||||
|
||||
<table class="props">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>log</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><code><a href="global.html#logger">logger</a></code></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>A logger</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="application.js.html">application.js</a>, <a href="application.js.html#line54">line 54</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="section-members">
|
||||
<h4 class="name" id="Context"><span class="type-signature"></span>Context<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Helpers for extracting information from the webhook event, which can be
|
||||
passed to GitHub API calls.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
|
||||
|
||||
<table class="props">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>github</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><code>github</code></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>A GitHub API client</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>payload</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><code><a href="global.html#payload">payload</a></code></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>The webhook event payload</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>log</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><code><a href="global.html#logger">logger</a></code></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>A logger</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="context.js.html">context.js</a>, <a href="context.js.html#line48">line 48</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Methods</h3>
|
||||
|
||||
|
||||
|
||||
<div class="section-method">
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Returns a boolean if the actor on the event was a bot.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="context.js.html">context.js</a>, <a href="context.js.html#line100">line 100</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Type Definitions</h3>
|
||||
|
||||
|
||||
|
||||
<div class="section-members">
|
||||
<h4 class="name" id="logger">logger</h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>A logger backed by <a href="https://github.com/trentm/node-bunyan">bunyan</a></p>
|
||||
<p>The default log level is <code>info</code>, but you can change it by setting the
|
||||
<code>LOG_LEVEL</code> environment variable to <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code>,
|
||||
<code>error</code>, or <code>fatal</code>.</p>
|
||||
<p>By default, logs are formatted for readability in development. If you intend
|
||||
to drain logs to a logging service, set <code>LOG_FORMAT=json</code>.</p>
|
||||
<p><strong>Note</strong>: All execptions reported with <code>logger.error</code> will be forwarded to
|
||||
<a href="https://github.com/getsentry/sentry">sentry</a> if the <code>SENTRY_DSN</code> environment
|
||||
variable is set.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="logger.js.html">logger.js</a>, <a href="logger.js.html#line2">line 2</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Example</h5>
|
||||
|
||||
<pre class="prettyprint"><code>app.log("This is an info message");
|
||||
app.log.debug("…so is this");
|
||||
app.log.trace("Now we're talking");
|
||||
app.log.info("I thought you should know…");
|
||||
app.log.warn("Woah there");
|
||||
app.log.error("ETOOMANYLOGS");
|
||||
app.log.fatal("Goodbye, cruel world!");</code></pre>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="section-members">
|
||||
<h4 class="name" id="payload">payload</h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>A <a href="https://developer.github.com/webhooks/#events">GitHub webhook event</a> payload</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="application.js.html">application.js</a>, <a href="application.js.html#line255">line 255</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 21:35:41 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -24,7 +24,7 @@
|
||||
<label for="nav-trigger" class="overlay"></label>
|
||||
|
||||
<nav>
|
||||
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li>
|
||||
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#Application">Application</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#Context">Context</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#get">get</a></span></li>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
@@ -57,7 +57,7 @@
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Jun 01 2018 15:04:28 GMT-0500 (CDT) using the Minami theme.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 21:35:41 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
|
||||
124
api/7.0.0-typescript.4/logger.js.html
Normal file
124
api/7.0.0-typescript.4/logger.js.html
Normal file
@@ -0,0 +1,124 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>logger.js - Documentation</title>
|
||||
|
||||
<script src="scripts/prettify/prettify.js"></script>
|
||||
<script src="scripts/prettify/lang-css.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
||||
<label for="nav-trigger" class="navicon-button x">
|
||||
<div class="navicon"></div>
|
||||
</label>
|
||||
|
||||
<label for="nav-trigger" class="overlay"></label>
|
||||
|
||||
<nav>
|
||||
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#Application">Application</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#Context">Context</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#get">get</a></span></li>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">logger.js</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>"use strict";
|
||||
/**
|
||||
* A logger backed by [bunyan](https://github.com/trentm/node-bunyan)
|
||||
*
|
||||
* The default log level is `info`, but you can change it by setting the
|
||||
* `LOG_LEVEL` environment variable to `trace`, `debug`, `info`, `warn`,
|
||||
* `error`, or `fatal`.
|
||||
*
|
||||
* By default, logs are formatted for readability in development. If you intend
|
||||
* to drain logs to a logging service, set `LOG_FORMAT=json`.
|
||||
*
|
||||
* **Note**: All execptions reported with `logger.error` will be forwarded to
|
||||
* [sentry](https://github.com/getsentry/sentry) if the `SENTRY_DSN` environment
|
||||
* variable is set.
|
||||
*
|
||||
* @typedef logger
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* app.log("This is an info message");
|
||||
* app.log.debug("…so is this");
|
||||
* app.log.trace("Now we're talking");
|
||||
* app.log.info("I thought you should know…");
|
||||
* app.log.warn("Woah there");
|
||||
* app.log.error("ETOOMANYLOGS");
|
||||
* app.log.fatal("Goodbye, cruel world!");
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var Logger = require("bunyan");
|
||||
var bunyanFormat = require("bunyan-format");
|
||||
var serializers_1 = require("./serializers");
|
||||
function toBunyanLogLevel(level) {
|
||||
switch (level) {
|
||||
case 'info':
|
||||
case 'trace':
|
||||
case 'debug':
|
||||
case 'warn':
|
||||
case 'error':
|
||||
case 'fatal':
|
||||
case undefined:
|
||||
return level;
|
||||
default:
|
||||
throw new Error('Invalid log level');
|
||||
}
|
||||
}
|
||||
function toBunyanFormat(format) {
|
||||
switch (format) {
|
||||
case 'short':
|
||||
case 'long':
|
||||
case 'simple':
|
||||
case 'json':
|
||||
case 'bunyan':
|
||||
case undefined:
|
||||
return format;
|
||||
default:
|
||||
throw new Error('Invalid log format');
|
||||
}
|
||||
}
|
||||
exports.logger = new Logger({
|
||||
level: toBunyanLogLevel(process.env.LOG_LEVEL || 'info'),
|
||||
name: 'probot',
|
||||
serializers: serializers_1.serializers,
|
||||
stream: new bunyanFormat({ outputMode: toBunyanFormat(process.env.LOG_FORMAT || 'short') }),
|
||||
});
|
||||
//# sourceMappingURL=logger.js.map</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jun 07 2018 21:35:41 GMT-0400 (EDT) using the Minami theme.
|
||||
</footer>
|
||||
|
||||
<script>prettyPrint();</script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +1 @@
|
||||
7.0.0-typescript.4
|
||||
6.2.0
|
||||
@@ -36,7 +36,7 @@ redirect_from:
|
||||
<p>
|
||||
Join us every
|
||||
<strong>
|
||||
<span class="js-office-hours-start-time" data-format="dddd">Friday</span> at
|
||||
<span class="js-office-hours-start-time" data-format="dddd">Thursday</span> at
|
||||
<span class="js-office-hours-start-time" data-format="h:mm A">17:00 UTC</span>
|
||||
</strong>
|
||||
to give feedback, ask questions, get help, or just chat about ideas.
|
||||
@@ -52,7 +52,7 @@ redirect_from:
|
||||
<var class="atc_date_end js-office-hours-end-time"></var>
|
||||
<var class="atc_timezone">UTC</var>
|
||||
<var class="atc_title">Probot Office Hours</var>
|
||||
<var class="atc_description">Join us every Friday to give feedback, ask questions, get help, or just chat about ideas.</var>
|
||||
<var class="atc_description">Join us every Thursday to give feedback, ask questions, get help, or just chat about ideas.</var>
|
||||
<var class="atc_location">{{ page.office_hours_link }}</var>
|
||||
</var>
|
||||
</span>
|
||||
|
||||
@@ -86,7 +86,7 @@ module.exports = app => {
|
||||
const params = context.issue({
|
||||
body: 'Hello World!'
|
||||
});
|
||||
context.github.issues.createComment(params);
|
||||
await context.github.issues.createComment(params);
|
||||
});
|
||||
};
|
||||
{% endhighlight %}
|
||||
|
||||
Reference in New Issue
Block a user