Coder Social home page Coder Social logo

brigade-pr-comment's Introduction

Maintenance

Comments on a pull request or issue

GitHub App Permissions:

  • read&write Pull Requests

or

  • read&write issues

Required Environment Variables

Key Description
APP_NAME Developer or App Name
WAIT_MS Wait until sending the comment (default: 120000)
COMMENT Comment to send
COMMENTS_URL https: //api.github.com/repos/[org]/[repo]/pulls/[id]
TOKEN jwt token to do api calls

Usage

With the Brigade-GitHub-App:

const payload = JSON.parse(e.payload)
const previewUrl = `${secrets.hostName}/preview/${imageTag}`

const prCommenter = new Job('pr-comment', 'anjakammer/brigade-pr-comment')
prCommenter.env = {
  APP_NAME: 'your-GitHub-App',
  WAIT_MS: '0', // default is 2 minutes
  COMMENT: `Preview Environment is set up: [https://${previewUrl}](${previewUrl})`,
  COMMENTS_URL: payload.body.pull_request.comments_url, // depends on webhook payload
  TOKEN: payload.token
}
prCommenter.run()

TODO

  • automagically fetch comments_url from every webhook payload possible.

This way, only passing the brigade-payload string is needed. comments_url and token can be fetched from it.

brigade-pr-comment's People

Contributors

anjakammer avatar dependabot[bot] avatar renovate-bot avatar snyk-bot avatar

Stargazers

 avatar

Watchers

 avatar

brigade-pr-comment's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm request Unavailable
npm request-promise Unavailable

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • node 16-slim
npm
package.json
  • request 2.88.2
  • request-promise 4.2.2

  • Check this box to trigger a request for Renovate to run again on this repository

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.