Questions tagged [probot]

Use this tag for questions about problems faced when developing apps with Probot, a framework for building GitHub Apps in Node.js.

Tag Usage

While adding the tag to the question, please make sure you have added the error messages in the console to your answer.

The tag should be used in the questions about problems related to:

Other resources

Probot's Official Website

Probot's Documentation

Probot Featured Applications

Probot's Community

Extending with GitHub: easy integrations with Probot - GitHub Universe 2017

52 questions
0
votes
1 answer

Get large string without catastrophic backtracking regex

I'm wanting to use Regex to get a specific file (e.g. package-lock.json) out of a git diff. The reason for this approach is because I'm getting a whole git diff via the Github API (Using Octocat js), therefore I can't just run the git diff on that…
Ben Rauzi
  • 564
  • 4
  • 13
0
votes
1 answer

Probot Octokit - Get file from specific branch

I'm using Probot's Octokit to read a file from a repo: const content = await context.octokit.repos.getContent({owner: "OWNER", repo: "REPO", path:"PATH"}) However this only works for the master branch, is there a way to get the file from another…
Ben Rauzi
  • 564
  • 4
  • 13
0
votes
1 answer

Read file from GH repository (Probot)

I'm using Probot/Octocat to run some code checks, one of the things I'm doing is checking against a list of breaking changes in a separate repository on an internal package update. Is there any easy way to read a file (.md) from a separate private…
Ben Rauzi
  • 564
  • 4
  • 13
0
votes
1 answer

Best practices for using a REPL debugger with Express.js / Node.js

I'm trying to understand how a framework built with Express.js, called Probot, works. I'm fairly new to JS and Node.js, but I know my way around Ruby / Rails. When I'm trying to debug something with Ruby / Rails, I'll use [byebug][2]. I'll insert…
eighdah14
  • 155
  • 6
0
votes
2 answers

Github Probot create-probot-app: 'Cannot POST /' (404) response to webhook request

Testing out the npx create-probot-app; tried with each of the starters and the same problem exists. I create, build, and run the app, and then configure and install the app on github, I am able to receive webhook events but I'm seeing my local app…
rnable
  • 3
  • 2
0
votes
1 answer

Probot logs do not appear

I'm trying to log the flow of my probot app but they do not appear in my terminal. I've set up a boilerplate project by running npx create-probot-app my-first-app and choosing the basic-ts project. My index.ts file looks like this - import { Probot…
Yaron Idan
  • 6,207
  • 5
  • 44
  • 66
0
votes
1 answer

Refactoring probot event functions into seperate file causes error: TypeError: handler is not a function

I have the vanilla probot event function from the docs that comments on new issues: const probotApp = app => { app.on("issues.opened", async context => { const params = context.issue({ body: "Hello World!" }); return…
EliteRaceElephant
  • 7,744
  • 4
  • 47
  • 62
0
votes
1 answer

Github Probot: why are pinned issues treated as style and marked as wont_fix?

Using Probot on Github and it is configured like this: exemptLabels: - pinned - security # Label to use when marking an issue as stale staleLabel: wontfix ... yet Probot marks pinned issue as "stale" (example). The issue does not have an…
andig
  • 13,378
  • 13
  • 61
  • 98
0
votes
1 answer

ERROR event: Not Found; when triggering event from another event : probot app built in nodejs

I am building a GitHub app in probot and nodejs and trying to update the PR whenever a pull_request.synchronize event occurs. I know that doesn't make much sense, but the point is I want to be able to update the PR upon the occurrence of a certain…
Asif Kamran Malick
  • 2,409
  • 3
  • 25
  • 47
0
votes
1 answer

Reject Pull Request creation request if PR message body validation fails

Is there a way we can reject the Pull Request creation if certain conditions fail ? I am developing a GitHub App in nodejs and probot and would like to reject the pull request creation when the developer clicks on the "Create pull request" button if…
Asif Kamran Malick
  • 2,409
  • 3
  • 25
  • 47
0
votes
1 answer

Significance of the generic pull_request event and other more specific pull_request events like pull_request.opened

I am developing a GitHub App using nodejs and probot framework. I can see the Application class (https://probot.github.io/api/latest/classes/application.html) of the probot framework contains events like : > event: "pull_request" |…
Asif Kamran Malick
  • 2,409
  • 3
  • 25
  • 47
0
votes
1 answer

Using labels to automatically write reply and close issue/PR on Github

I would like to know if there is an existing way (probably app) to automatically write a reply and close an issue on Github based on a tag. For example, if I tag an issue with the label "upstream-something", I would like that it to write "your issue…
Denis Rouzaud
  • 2,412
  • 2
  • 26
  • 45
0
votes
1 answer

Prevent-private-repos probot not functioning

Prevent-Public-Repos Probot App Not changing repo to private So far I have adjusted the parameters and tested various combinations of values. From what I can see on my Github Enterprise account (we are using cloud) is there is a new repository…
CBD
  • 1
0
votes
2 answers

How do I retrieve all the reviewers in the PR in a GitHub Probot

how do I retrieve all the reviewers in a pull request from Probot? I am using typescript. I am also listening on pull_request event type in Probot. I think I need to call context.github.pullRequests.getReview to get the list of reviewers, but since…
Shravan Ramamurthy
  • 3,896
  • 5
  • 30
  • 44
0
votes
1 answer

How to retrieve the PR number in nodejs github probot listening on `pull_request` event

I have created a GitHub probot app using nodejs and typescript. I am listening on pull_request event. How do I retrieve pr_number from the probot context object? following is the code in intex.ts export = (app: Application) => { …
Shravan Ramamurthy
  • 3,896
  • 5
  • 30
  • 44