GithubHelp home page GithubHelp logo

danger / peril Goto Github PK

View Code? Open in Web Editor NEW
460.0 12.0 57.0 20.57 MB

☢️ Serious and immediate danger.

Home Page: https://danger.systems

License: MIT License

HTML 0.50% TypeScript 93.41% JavaScript 3.71% Shell 1.04% Dockerfile 0.04% CSS 1.30% Ruby 0.01%
danger ci wehbooks express node nodejs

peril's Introduction

per·il ˈperəl noun

  1. serious and immediate danger. "their family was in peril".

Peril is a tool that takes GitHub webhooks, and makes it easy to build one-off actions. It does this by having a per-account settings JSON, that connects JavaScript files to events from webhooks. So, for example, you can write a rule which runs when closing an issue in GitHub that looks for associated Jira tickets and resolves them. Peril provides no implicit actions like that, it instead offers a JavaScript runtime environment optimised to this domain so you can make actions to fit your needs.

Want to understand what the plan is? Consult the VISION.md


Peril uses Danger JS under the hood, Danger is a tool built for adding extra tests inside Pull Requests that can work at a different level of abstraction to unit and integration tests. For example, you could write tests which:

  • Enforce CHANGELOGs
  • Enforce links to Trello/JIRA in PR/MR bodies
  • Enforce using descriptive labels
  • Look out for common anti-patterns
  • Highlight interesting build artifacts
  • Give warnings when specific files change

... and any other rules specific to your team's culture and needs.


Peril vs GitHub Actions.

80% of Peril is available today in GitHub Actions. Key things which are not:

  • Multi-repo support (which is on the Actions roadmap)
  • Pre-workflow evaluation on webhook data (basically the ability to refuse to run the workflow unless something is set in the webhook JSON)
  • Triggering delayed jobs from webhooks (e.g. do this thing in 5m)

Is this enough to warrant self-hosting? Maybe, but it's pushing it a bit if you aren't comfortable hosting a JS project. Danger got extended with a lot of Peril's features in order to better support GitHub Actions during the alpha.

Given that I, Orta, can't install Peril on the Microsoft GitHub org, and GitHub Actions has most of Peril's features - it's unlikely that I'll be building much more into the core. I'll keep it ticking though, it's not much work.


I want to use Peril

You have two choices:

  • Wait for me to ship Peril to production (probably mid-2019)
  • Self-host your own Peril

I want to run Peril for my org

OK, I made a quick tutorial for running a private Peril against your org - this is for Heroku, but the underlying principles work for all of them.

I want to hack on Peril!

Ace, great, cool. So, it's a bit of a process. I'm not sure if this will get easier in time. It's a complex app. You can find out more here.

This Repo

This repo is a mono-repo with three main responsibilities:

  • api - The Peril WebHook + API
  • dashboard - The Admin Panel for logged in users
  • web - A static website for the public

Docs

peril's People

Contributors

ashfurrow avatar bdotdub avatar danpalmer avatar duck8823 avatar felipesabino avatar flovilmart avatar greenkeeper[bot] avatar izaakschroeder avatar izakp avatar jamonholmgren avatar jtreanor avatar kimar avatar krausefx avatar leonhartx avatar loremattei avatar m1guelpf avatar macklinu avatar maximeheckel avatar mxstbr avatar nsfmc avatar olivertso avatar orta avatar peril-staging[bot] avatar pieh avatar roopakv avatar sd10 avatar sibelius avatar steprescott avatar vitaly-t avatar zephraph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

peril's Issues

Fix Internal Terminology

There is one GitHub integration per setup of the app. This is stored in the ENV.

There are multiple installations of that integrations. Each installation could have different settings. This is what gets put in the db.

Peril launches without being able to access plugins because you don't have PERIL_ORG_INSTALLATION_ID yet

-----> Node.js app detected
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  7.10.1
       engines.npm (package.json):   unspecified (use default)
       engines.yarn (package.json):  unspecified (use default)
       
       Resolving node version 7.10.1...
       Downloading and installing node 7.10.1...
       Using default npm version: 4.2.0
       Resolving yarn version (latest)...
       Downloading and installing yarn (0.28.4)...
       Installed yarn 0.28.4
-----> Restoring cache
       Skipping cache restore (not-found)
-----> Building dependencies
       Installing node modules (yarn.lock)
       yarn install v0.28.4
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       warning [email protected]: The platform "linux" is incompatible with this module.
       info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
       [3/4] Linking dependencies...
       warning "[email protected]" has incorrect peer dependency "pg@>=4.3.0 <8.0.0".
       warning "[email protected]" has unmet peer dependency "sinon@1".
       [4/4] Building fresh packages...
       success Saved lockfile.
       $ yarn build; if [ $DATABASE_JSON_FILE ]; then yarn run setup; fi
       yarn build v0.28.4
       $ yarn tsc
       Done in 3.68s.
       yarn run v0.28.4
       $ yarn run setup:plugins && yarn run setup:env
       Skipping papertrail setup for winston.
       error: res: https://api.github.com/repos/orta/peril/contents/settings-peril.json?
       error: Getting GitHub file failed: {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
       (node:378) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Sorry, if you have a Peril JSON setttings file in a private repo, you will need an installation ID for your integration. You can find this inside the integration_installation event sent when you installed the integration into your org. Set this as "PERIL_ORG_INSTALLATION_ID" in your ENV vars.
       (node:378) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
       Done in 4.32s.
       Done in 29.42s.
-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)
-----> Build succeeded!
 !     Unmet dependencies don't fail yarn install but may cause runtime issues
       https://github.com/npm/npm/issues/7494
-----> Discovering process types
       Procfile declares types     -> (none)
       Default types for buildpack -> web
-----> Compressing...
       Done: 31.1M
-----> Launching...
       Released v4
       https://cocoapods-peril.herokuapp.com/ deployed to Heroku

[Bug] Initial Setup Clarification

When following the instructions in the readme file for performing initial setup and installation, I came across the following errors:

  • PERIL_BOT_USER_ID marked as not required, but presented a hard-error when running yarn start without it defined.
  • WEB_URL marked as not used, but presented a hard-error when running yarn start without it defined.
  • PAPERTRAIL_URL/PAPERTRAIL_PORT marked as optional, but presented a hard-error when running yarn start without them defined.
  • Upon running yarn start, got two warning messages printed to the console:
    WARNING: No configurations found in configuration directory:/Users/Samantha/Projects/peril/config
    WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.
    
  • Once the server was running and forwarded by ngrok, resending the initial creation message from the integration was picked up correctly and forwarded by ngrok, however didn't cause peril to progress in state to setup the new installation.

Support multiple integrations with different levels of access

It shouldn't be too difficult to support multiple integrations, maybe have three :

  • PRs/Issues
  • The most obviously useful events
  • All event

The integration ID can be stored in the org's db, then Danger can sign with different keys depending on what data was sent.

An in-range update of body-parser is breaking the build 🚨

Version 1.17.2 of body-parser just got published.

Branch Build failing 🚨
Dependency body-parser
Current Version 1.17.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

body-parser is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes 1.17.2
Commits

The new version differs by 13 commits.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Handle missing Dangerfile elegantly

I think if the file is missing you get:

2017-05-05T20:16:45.287369+00:00 app[web.1]: info: [router] -  - passing to Dangerfile rule router
2017-05-05T20:16:45.288709+00:00 app[web.1]: info: [runner] - Event Settings: {
2017-05-05T20:16:45.288711+00:00 app[web.1]:  "commentableID": 1,
2017-05-05T20:16:45.288711+00:00 app[web.1]:  "isRepoEvent": true,
2017-05-05T20:16:45.288712+00:00 app[web.1]:  "isTriggeredByUser": true,
2017-05-05T20:16:45.288713+00:00 app[web.1]:  "repo": null,
2017-05-05T20:16:45.288714+00:00 app[web.1]:  "repoName": "artsy/artsy-danger",
2017-05-05T20:16:45.288714+00:00 app[web.1]:  "triggeredByUsername": "orta",
2017-05-05T20:16:45.288714+00:00 app[web.1]:  "hasRelatedCommentable": true
2017-05-05T20:16:45.288715+00:00 app[web.1]: }
2017-05-05T20:16:45.332220+00:00 app[web.1]: info: [runner] - Running: {
2017-05-05T20:16:45.332223+00:00 app[web.1]:  "event": "pull_request",
2017-05-05T20:16:45.332224+00:00 app[web.1]:  "action": "opened",
2017-05-05T20:16:45.332224+00:00 app[web.1]:  "dslType": 0,
2017-05-05T20:16:45.332225+00:00 app[web.1]:  "dangerfilePath": "blank.ts",
2017-05-05T20:16:45.332226+00:00 app[web.1]:  "repoSlug": "artsy/artsy-danger",
2017-05-05T20:16:45.332226+00:00 app[web.1]:  "feedback": 0
2017-05-05T20:16:45.332227+00:00 app[web.1]: }
2017-05-05T20:16:45.332313+00:00 app[web.1]: info: [runner] - Use fullDSL: true
2017-05-05T20:16:45.332395+00:00 app[web.1]: info: [runner] - supportGithubCommentAPIs: true
2017-05-05T20:16:45.391443+00:00 app[web.1]: info: [runner] - Running Danger: got API? null
2017-05-05T20:16:46.034269+00:00 app[web.1]: Error:  { Error: Cannot find module 'ts-jest' from 'blank.ts'
2017-05-05T20:16:46.034285+00:00 app[web.1]:     at Resolver.resolveModule (/app/node_modules/jest-resolve/build/index.js:169:17)
2017-05-05T20:16:46.034286+00:00 app[web.1]:     at Resolver._getVirtualMockPath (/app/node_modules/jest-resolve/build/index.js:289:23)
2017-05-05T20:16:46.034287+00:00 app[web.1]:     at Resolver._getAbsolutPath (/app/node_modules/jest-resolve/build/index.js:272:10)
2017-05-05T20:16:46.034287+00:00 app[web.1]:     at Resolver.getModuleID (/app/node_modules/jest-resolve/build/index.js:248:31)
2017-05-05T20:16:46.034288+00:00 app[web.1]:     at Runtime._shouldMock (/app/node_modules/jest-runtime/build/index.js:508:20)
2017-05-05T20:16:46.034289+00:00 app[web.1]:     at Runtime.requireModuleOrMock (/app/node_modules/jest-runtime/build/index.js:362:14)
2017-05-05T20:16:46.034290+00:00 app[web.1]:     at Object.<anonymous> (/tmp/0.ops22k27rl5lw71fefxn7b9/blank.ts:1:90)
2017-05-05T20:16:46.034290+00:00 app[web.1]:     at Runtime._execModule (/app/node_modules/jest-runtime/build/index.js:447:13)
2017-05-05T20:16:46.034291+00:00 app[web.1]:     at Runtime.requireModule (/app/node_modules/jest-runtime/build/index.js:295:14)
2017-05-05T20:16:46.034292+00:00 app[web.1]:     at /app/node_modules/danger/distribution/runner/DangerfileRunner.js:136:33 code: 'MODULE_NOT_FOUND' }
2017-05-05T20:16:46.034482+00:00 app[web.1]: /app/out/peril.js:11
2017-05-05T20:16:46.034483+00:00 app[web.1]:     throw reason;
2017-05-05T20:16:46.034484+00:00 app[web.1]:     ^
2017-05-05T20:16:46.034485+00:00 app[web.1]:
2017-05-05T20:16:46.034486+00:00 app[web.1]: Error: Cannot find module 'ts-jest' from 'blank.ts'
2017-05-05T20:16:46.034487+00:00 app[web.1]:     at Resolver.resolveModule (/app/node_modules/jest-resolve/build/index.js:169:17)
2017-05-05T20:16:46.034487+00:00 app[web.1]:     at Resolver._getVirtualMockPath (/app/node_modules/jest-resolve/build/index.js:289:23)
2017-05-05T20:16:46.034488+00:00 app[web.1]:     at Resolver._getAbsolutPath (/app/node_modules/jest-resolve/build/index.js:272:10)
2017-05-05T20:16:46.034488+00:00 app[web.1]:     at Resolver.getModuleID (/app/node_modules/jest-resolve/build/index.js:248:31)
2017-05-05T20:16:46.034489+00:00 app[web.1]:     at Runtime._shouldMock (/app/node_modules/jest-runtime/build/index.js:508:20)
2017-05-05T20:16:46.034490+00:00 app[web.1]:     at Runtime.requireModuleOrMock (/app/node_modules/jest-runtime/build/index.js:362:14)
2017-05-05T20:16:46.034490+00:00 app[web.1]:     at Object.<anonymous> (/tmp/0.ops22k27rl5lw71fefxn7b9/blank.ts:1:90)
2017-05-05T20:16:46.034491+00:00 app[web.1]:     at Runtime._execModule (/app/node_modules/jest-runtime/build/index.js:447:13)
2017-05-05T20:16:46.034492+00:00 app[web.1]:     at Runtime.requireModule (/app/node_modules/jest-runtime/build/index.js:295:14)
2017-05-05T20:16:46.034492+00:00 app[web.1]:     at /app/node_modules/danger/distribution/runner/DangerfileRunner.js:136:33
2017-05-05T20:16:46.049499+00:00 app[web.1]:

An in-range update of jsonwebtoken is breaking the build 🚨

Version 7.4.0 of jsonwebtoken just got published.

Branch Build failing 🚨
Dependency jsonwebtoken
Current Version 7.3.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

jsonwebtoken is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details - ❌ **continuous-integration/travis-ci/push** The Travis CI build failed [Details](https://travis-ci.org/danger/peril/builds/225299425)

Commits

The new version differs by 6 commits0.

  • b0e443c 7.4.0
  • 07a47a3 Merge pull request #328 from ziluvatar/npb-exp-iat-docs-numeric-date
  • 659f731 Add docs about numeric date fields
  • 2ec4960 Merge pull request #320 from ziluvatar/make-options-optional-on-async-call
  • e202c4f Make Options object optional for callback-ish sign
  • 636fbd0 Update changelog

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Replace the org check with a check to see if the dangerfile has changed

This should be default, it can deprecate the org check completely.

  • For a PR on an OSS repo
  • For dangerfile that are on the same repo as the PR's base
  • Get the head dangerfile, get the base dangerfile
  • If they differ, don't eval - instead do a "Sorry, not running Dangerfile due to changes in this run"

An in-range update of ts-jest is breaking the build 🚨

Version 19.0.3 of ts-jest just got published.

Branch Build failing 🚨
Dependency ts-jest
Current Version 19.0.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As ts-jest is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Commits

The new version differs by 7 commits .

  • 0302774 Bump version
  • a5634b8 Merge pull request #140 from kulshekhar/139-tsconfig-comments
  • d5c5646 Add downloads badge
  • 3c1c50a Allow comments in tsconfig
  • 78c4d79 fix test
  • 7c9375d write a failing test
  • f770e89 Fix tsc compilation failure due to lodash defn

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of @types/jest is breaking the build 🚨

Version 19.2.3 of @types/jest just got published.

Branch Build failing 🚨
Dependency @types/jest
Current Version 19.2.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/jest is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of @types/winston is breaking the build 🚨

Version 2.3.1 of @types/winston just got published.

Branch Build failing 🚨
Dependency @types/winston
Current Version 2.3.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As @types/winston is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of ts-node is breaking the build 🚨

Version 3.0.3 of ts-node just got published.

Branch Build failing 🚨
Dependency ts-node
Current Version 3.0.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

ts-node is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details - ❌ **continuous-integration/travis-ci/push** The Travis CI build failed [Details](https://travis-ci.org/danger/peril/builds/228514552?utm_source=github_status&utm_medium=notification)

Commits

The new version differs by 6 commits0.

  • 1856f71 3.0.3
  • 491ce93 Delete config options after TypeScript parse (#321)
  • f3ce9a5 Add Greenkeeper badge 🌴 (#316)
  • c18692a Update Travis CI build matrix (#303)
  • 8e3c7e5 Update TSLint
  • 8146c91 Add info about tsconfig-paths to readme (#295)

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Getting 404 on /webhook when installing the integration

I've followed the README steps to configure peril on my laptop
Everything seems to work fine however, whenever I add the integration to a repo, ngrox logs

POST /webhook                  404 Not Found

I guess that's what you're mentioning in

You need to make sure that the install message is sent to your dev setup, so it will grab the access tokens and set up an installation account for it in mongo (X-GitHub-Event: integration_installation).

right?
After that whenever I open a PR I get the correct payload sent to the server (with a 200 code), but nothing will show up on the pull request page despite having set up the permissions correctly (same as the Danger integration)
I guess this is due to this issue but maybe I'm wrong

An in-range update of typescript is breaking the build 🚨

Version 2.3.1 of typescript just got published.

Branch Build failing 🚨
Dependency typescript
Current Version 2.3.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

typescript is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details - ❌ **continuous-integration/travis-ci/push** The Travis CI build failed [Details](https://travis-ci.org/danger/peril/builds/226558699)

Release Notes TypeScript 2.3

For release notes, check out the release announcement

For new features, check out the What's new in TypeScript 2.3.

For breaking changes, check out the Breaking changes in TypeScript 2.3 page.

For the complete list of fixed issues, check out the issues fixed in TypeScript 2.3 RC and after TypeScript 2.3 RC.

Download:

Special thanks to all contributors to this release:

  • Akinmade Bond
  • Anders Hejlsberg
  • Andy Hanson
  • Argelius Andreas
  • @arjunyel
  • Artem Roshko
  • Arthur Ozga
  • Bill Ticehurst
  • Christian Silver
  • Christophe Vidal
  • @cedvdb
  • Daniel Lehenbauer
  • Daniel Rosenwasser
  • Diullei Gomes
  • @e-cloud
  • Erik McClenney
  • @falsandtru
  • Hendrik Liebau
  • Herrington Darkholme
  • Igor Novozhilov
  • James Henry
  • Jason Jarrett
  • Jason Ramsay
  • Josh Goldberg
  • K. Preißer
  • Kagami Sascha Rosylight
  • Kanchalai Tanglertsampan
  • Klaus Meinhardt
  • Logan Mzz
  • Magnus Hiie
  • Matt Bierner
  • Matt McCutchen
  • Mike Busyrev
  • Mine Starks
  • Mohamed Hegazy
  • Natalie Coley
  • Nathan Shively-Sanders
  • Nico Kemnitz
  • Nicolas Henry
  • Oleg Mihailik
  • Ron Buckton
  • Ryan Cavanaugh
  • Soo Jae Hwang
  • Tuure Savuoja
  • Vadi Taslim
  • Vincent Bel
  • Vladimir Matveev
  • Zhengbo Li
Commits

The new version differs by 346 commits0.

  • 47e5569 Update LKG
  • 9ada915 Merge pull request #15381 from Microsoft/revert15104
  • fe0a307 Revert "Treat callback parameters as strictly covariant"
  • 96a3c91 Revert "Fix callback types to match covariantly"
  • 70bb2d3 Revert "Accept new baselines"
  • 3abd0c8 Revert "Add tests"
  • 42d6a9c Revert "Check callback return values bi-variantly"
  • d581bed Revert "Accept new baselines"
  • cf17be2 Revert "Add another test case"
  • e86512e Revert "Allow callbacks unioned with null and/or undefined"
  • 22647bb Revert "Update tests"
  • 8a85f4a Update LKG
  • 3c3b73e Merge branch 'master' into release-2.3
  • a0abadb Merge pull request #15320 from Microsoft/fixTypePredicateThisParameter
  • 5783435 Merge pull request #15330 from gcnew/exportConsts

There are 250 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Permissions for Peril integration

I'm getting 401 whenever I open/close a Pull Request with Peril/DangerJS and I wondered if my integration is set correctly, I keep comparing with the Danger one, but I can't see what I've missed

integrations_-_peril
integrations_-_peril

Support Peril plugins

An example would be a wrapper for danger-plugin-spellcheck.

  • It would be able to declare itself into the rules (in this case, on any PR)
  • It would be able to eval a dangerfile (in this case, basically just the default settings)
  • It would be declared inside the JSON?

repos should not be required in settings.json

Following disussions in #99 , we determined that the repos keys should not be required to have peril run successfully if org-wide settings are set by rules.

in case of conflict, repos settings should override the defined rules.

[Dev Happiness] Add a simple set of testing functions to mock webhooks

On a separate project I work on, I have set up a small script that allows you to specify a webhook mock, and a function, and it calls that particular function with the mocked hook.

For instance, I have a few JSON files containing push webhook request JSON details.

On the CLI, I can call ./tools/testhook <fn-name> <webhook-type> and it will call the correct function and pass in the webhook data.

I'll be honest, I haven't read through the code yet, but that should make debugging a lot easier.

If people are keen for this, I'll open a PR.

access_token null

Sometime the access_token of the integration installation is null in the DB (sometime it's not, so my guess would be a race condition)

I tried to print the credentials variable in integration_installation.ts and I got:

peril_1    | { message: '\'Expiration time\' claim (\'exp\') must be a numeric value representing the future time at which the assertion expires',
peril_1    |   documentation_url: 'https://developer.github.com/v3' }

Not sure exactly why it's Github is returning that. Retrying to install/uninstall the integration makes it eventually output the token as expected.

An in-range update of node-fetch is breaking the build 🚨

Version 1.7.0 of node-fetch just got published.

Branch Build failing 🚨
Dependency node-fetch
Current Version 1.6.3
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

node-fetch is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v1.7.0

This is a backport maintenance release, see changelog for details

Commits

The new version differs by 8 commits.

  • cf71a1b 1.7.0
  • 0f09608 try to fix travis build config again
  • 93d5eb6 update travis to only install old npm for older node release
  • 8e11298 pin npm at an older version for node 0.10 support
  • f43c6a6 update readme badge
  • 2fca3e9 switch 1.x branch to codecov as well
  • 3043012 revert error handling for no-content json response
  • 325f13d commit to allow some feature backport in 1.x

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Secure/Validate the GitHub request

Currently anyone can send any JSON to trigger Peril ATM, support the password for GitHub and ensure that any request is signed from them.

Support hooking up Danger to any github event

  • An installation can be on 1 to many repos
  • An installation should be able to declare a global setting
  • Any repo should have the ability to define what events they trigger danger runs one. e.g. danger.json or as a "danger" subsection in your package.json.
{
  "run_global_events" : false,
  "events" : {
   "pull_request.*" : "dangerfile.ts",
   "issue.created, issue.updated" : "danger/dangerfile-issues.ts"
  }
}

This would be based on the X-GitHub-Event header, and after the dot would be the action from the JSON. I couldn't find a list of the events, so we may need to keep a list somewhere.

The key should be able to handle:

Which means that you can somewhere define a global installation dangerfile events system:

{
  "members_of_org_only": "artsy",
  "events" : {
   "pull_request.*" : "dangerfile.ts",
   "issue.created, issue.updated" : "danger/dangerfile-issues.ts"
  }
}

This probably needs to go either in Peril's db itself. Or potentially you can specify a danger setup repo, and it's danger.json/package.json is used to define all repo in integration's setup.g

An in-range update of @types/express is breaking the build 🚨

Version 4.0.36 of @types/express just got published.

Branch Build failing 🚨
Dependency @types/express
Current Version 4.0.35
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/express is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of node-pg-migrate is breaking the build 🚨

Version 1.3.0 of node-pg-migrate just got published.

Branch Build failing 🚨
Dependency node-pg-migrate
Current Version 1.2.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As node-pg-migrate is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 6 commits .

  • c083ed3 1.3.0
  • bfca657 Moving variables and check to place where it is actually used (#76)
  • 6b2cd7f Updated dependencies
  • 97efa2d Allow createType to be used for composite types (#74)
  • 50f8e00 Avoid use of ex: (#75)
  • 5225339 Updated docs with PGSSLMODE env var

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of winston-papertrail is breaking the build 🚨

Version 1.0.5 of winston-papertrail just got published.

Branch Build failing 🚨
Dependency winston-papertrail
Current Version 1.0.4
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

winston-papertrail is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of @types/jsonwebtoken is breaking the build 🚨

Version 7.2.1 of @types/jsonwebtoken just got published.

Branch Build failing 🚨
Dependency @types/jsonwebtoken
Current Version 7.2.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/jsonwebtoken is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

`danger.github.pr` is undefined

Background

I followed the steps to deploy on heroku for the full organization (parse-community) and got peril running with danger 1.0

Configuration

The following env vars are set:

DATABASE_JSON_FILE = parse-community/[email protected]
PERIL_BOT_USER_ID = 26932219 // may be inaccurate
PERIL_INTEGRATION_ID = xxxx // working
PERIL_ORG_INSTALLATION_ID = xxxx
PERIL_WEBHOOK_SECRET = xxxx
PRIVATE_GITHUB_SIGNING_KEY = xxx

Reporting any message work as expected so peril is correctly configured from that standpoint.

Logs

Now, when a PR event is received this is the log:

2017-07-01T16:06:15.262501+00:00 app[web.1]: info: [runner] - Event Settings: {
2017-07-01T16:06:15.262502+00:00 app[web.1]:  "commentableID": 10,
2017-07-01T16:06:15.262503+00:00 app[web.1]:  "hasRelatedCommentable": true,
2017-07-01T16:06:15.262503+00:00 app[web.1]:  "isRepoEvent": true,
2017-07-01T16:06:15.262503+00:00 app[web.1]:  "isTriggeredByUser": true,
2017-07-01T16:06:15.262504+00:00 app[web.1]:  "repo": null,
2017-07-01T16:06:15.262504+00:00 app[web.1]:  "repoName": "parse-community/peril",
2017-07-01T16:06:15.262505+00:00 app[web.1]:  "triggeredByUsername": "flovilmart"
2017-07-01T16:06:15.262505+00:00 app[web.1]: }
2017-07-01T16:06:15.310297+00:00 app[web.1]: info: [runner] - Running: {
2017-07-01T16:06:15.310300+00:00 app[web.1]:  "event": "pull_request",
2017-07-01T16:06:15.310300+00:00 app[web.1]:  "action": "synchronize",
2017-07-01T16:06:15.310301+00:00 app[web.1]:  "dslType": 0,
2017-07-01T16:06:15.310302+00:00 app[web.1]:  "dangerfilePath": "dangerfiles/pr.js",
2017-07-01T16:06:15.310302+00:00 app[web.1]:  "repoSlug": "parse-community/peril",
2017-07-01T16:06:15.310303+00:00 app[web.1]:  "feedback": 0
2017-07-01T16:06:15.310303+00:00 app[web.1]: }
2017-07-01T16:06:15.310410+00:00 app[web.1]: info: [runner] - Use fullDSL: true
2017-07-01T16:06:15.310539+00:00 app[web.1]: info: [runner] - supportGithubCommentAPIs: true
2017-07-01T16:06:15.362852+00:00 app[web.1]: info: [runner] - Running Danger: got API? null
2017-07-01T16:06:15.859265+00:00 heroku[router]: at=info method=POST path="/webhook" host=peril-parse-community.herokuapp.com request_id=11b79eec-7981-41ac-a851-9a212a47e2ce fwd="192.30.252.41" dyno=web.1 connect=1ms service=626ms status=200 bytes=216 protocol=https
2017-07-01T16:06:15.860777+00:00 heroku[router]: at=info method=POST path="/webhook" host=peril-parse-community.herokuapp.com request_id=46079c98-404f-4bca-954b-de3907f2fac8 fwd="192.30.252.42" dyno=web.1 connect=1ms service=165ms status=204 bytes=147 protocol=https
2017-07-01T16:06:15.852741+00:00 app[web.1]: info: [runner] - Commenting, with results:
2017-07-01T16:06:15.852763+00:00 app[web.1]: mds: 0
2017-07-01T16:06:15.852764+00:00 app[web.1]: mds: 0
2017-07-01T16:06:15.852765+00:00 app[web.1]: warns: 0
2017-07-01T16:06:15.852765+00:00 app[web.1]: fails: 1
2017-07-01T16:06:15.864118+00:00 app[web.1]: info: [router] -  - passing to Dangerfile rule router
2017-07-01T16:06:15.852766+00:00 app[web.1]:
2017-07-01T16:06:16.032212+00:00 app[web.1]: Request failed [403]: https://api.github.com/repos/parse-community/peril/statuses/f5a1c18e0a1f5e2afc66dad8d6c44ef02dcdcfc8
2017-07-01T16:06:16.032263+00:00 app[web.1]: Response: {
2017-07-01T16:06:16.032266+00:00 app[web.1]: }
2017-07-01T16:06:16.032264+00:00 app[web.1]:   "message": "Resource not accessible by integration",
2017-07-01T16:06:16.032265+00:00 app[web.1]:   "documentation_url": "https://developer.github.com/v3"
2017-07-01T16:06:16.032912+00:00 app[web.1]: Failing the build, there is 1 fail.

2 things that bug me:

  1. github api is null ? Running Danger: got API? null
  2. Resource not accessible, but all are configured as suggested with read access to commits etc...

An in-range update of ts-jest is breaking the build 🚨

Version 19.0.9 of ts-jest just got published.

Branch Build failing 🚨
Dependency ts-jest
Current Version 19.0.8
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As ts-jest is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 16 commits .

  • 9c5a34c Bump version
  • 1b283f7 Update AUTHORS
  • 553a4fa Merge pull request #165 from kulshekhar/long-path
  • 6e59676 Use platform neutral path separator
  • 0c9e2e4 Uncomment fix for long paths
  • d0d7026 Get tests for long paths to fail on appveyor
  • 36cd464 Reduce the pathname for testing on windows
  • b9e84b2 Merge pull request #162 from 4kochi/long-file-name-shortener
  • 3d1f505 Add tests for long paths
  • 1be4ef8 Add comments and cleanup code
  • 89b8874 Update AUTHORS
  • 6cafc19 Merge pull request #163 from unindented/patch-1
  • 844fa41 Remove unnecessary ^2.2.0-dev for typescript
  • 1c3bf3d Strip package root part of filename before encoding the filename for the cache
  • 2d9537c Merge pull request #159 from kulshekhar/appveyor-longpath

There are 16 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Issues when installing github integration and opening PR on a project with Peril

I've Peril all set up, followed each new steps of the read me (cf #10) but I got the following issues:

When installing the plugin on one of my repo I'm getting:

Error:  [Error: error:0906D066:PEM routines:PEM_read_bio:bad end line]

I guess that's because I don't have a bio maybe?

Second issue is perhaps mongo related, whenever I open a PR I'm getting from peril:

Error:  [TypeError: Cannot read property 'findOne' of undefined]

From the mongo.ts file I've deducted that maybe I had an issue getting my db and collection in mongo. However everything seems in order:

> show dbs
github_installations  0.078GB
local                 0.078GB
> use github_installations
switched to db github_installations
> show collections
github_integrations
system.indexes

An in-range update of danger is breaking the build 🚨

Version 0.14.2 of danger just got published.

Branch Build failing 🚨
Dependency danger
Current Version 0.14.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As danger is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 27 commits .

There are 27 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of pg-promise is breaking the build 🚨

Version 5.6.5 of pg-promise just got published.

Branch Build failing 🚨
Dependency pg-promise
Current Version 5.6.4
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

pg-promise is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details - ❌ **continuous-integration/travis-ci/push** The Travis CI build failed [Details](https://travis-ci.org/danger/peril/builds/224644839)

Commits

The new version differs by 5 commits0.

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of @types/pg is breaking the build 🚨

Version 6.1.39 of @types/pg just got published.

Branch Build failing 🚨
Dependency @types/pg
Current Version 6.1.38
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As @types/pg is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪


Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.