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.
50
questions
0
votes
0
answers
20
views
Node.js Probot actions on new merge and PR
On new merge into main, try to merge the latest changes into feature/* branches
On any new PR against main / update to PR, check if the PR template is filled up as expected, if not mark the PR status ...
0
votes
0
answers
22
views
How do we store secrets programatically in probot?
I am trying to store a secret that I am calling with the following line of code:
const {token} = await context.github.auth({type: "installation"});
I cannot find the API to store the ...
0
votes
0
answers
63
views
How to create a repository using Probot?
I want to build an app that can perform automatically create a new repo in GitHub.
I followed https://probot.github.io/docs/http/:
import { Probot, ApplicationFunctionOptions, Context } from 'probot'
...
9
votes
1
answer
2k
views
Creation of probot.github app failing with Error: The programmatic API was removed in npm v8.0.0
I am trying to install probot.github app using the command npx create-probot-app my-first-app from the link: https://probot.github.io/docs/development/.
I am using the latest node v19.3.0 with npm ...
0
votes
1
answer
198
views
GitHub probot : signature does not match event payload and secret
I am aware of this question GitHub Probot : ERROR probot : signature does not match event payload and secret. In my case the problem is a bit weirder. So when I'm running my application on the ...
2
votes
1
answer
115
views
Cannot create an app that listens the webhook "pull_request_review_thread"
I am trying to create a simple app that will output the payload after the webhook "pull_request_review_thread" is triggered with any action. Here is the link to the related webhook: ...
1
vote
3
answers
361
views
How add Probot HTTP routes in Typescript?
I'm having a hard time writing custom HTTP routes on my probot written in Typescript.
The only example in documentation is pure JS but I couldn't figure out how to translate it to TS.
module.exports =...
0
votes
1
answer
38
views
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), ...
0
votes
1
answer
1k
views
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 ...
0
votes
1
answer
376
views
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 ...
0
votes
1
answer
152
views
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 ...
0
votes
2
answers
388
views
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 ...
3
votes
0
answers
387
views
503: Service Unavailable AWS Lambda with Github Probot
I'm trying to receive webhooks from Github using a probot application, but every single time I try this, I get a {"message":"Service Unavailable"} error.
Github sends this payload ...
1
vote
1
answer
3k
views
How to create a branch using probot (octokit)?
I want to create a branch using Probot. Seeing that it uses octokit/rest.js, I went over the octokit docs but couldn't find a method to do so. So how do I create a branch?
Also note that I mean to ...
0
votes
1
answer
472
views
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 ...
1
vote
1
answer
197
views
Get corresponding PR from Github deployment status webhook
I am creating a Github app that listens for deployment_status.created webhook events. The webhook is triggered when a PR is automatically deployed (using a 3rd party Github app).
When the deployment ...
1
vote
2
answers
633
views
How to edit files using (pro)bot on GitHub?
I'm building a GitHub bot using probot framework for editing the README.md of the repository but so far I could not find a way to edit files using probot and neither using any other GitHub bot ...
1
vote
2
answers
674
views
Check if a Github repo was created using a template from Probot
I have an Github Bot (Probot) that I use to handle automation for things like naming conventions etc etc.
I also have a number of teams that we use for controlling visibility and I was wondering if it'...
0
votes
1
answer
205
views
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....
1
vote
1
answer
325
views
How can I access the Express app instance to set CORS origin in a Probot app?
The probot documentation mentions that I can use routes just like I would in a vanilla Express server.
I wantr to set CORS origin headers for these routes. In a vanilla Express server I would use the ...
3
votes
0
answers
162
views
List github issue revisions - octokit
I'm developing a probot application to prevent disclosure of sensitive information on github issues.
When I edit out the sensitive information from the github-issue, the information can still be ...
3
votes
1
answer
544
views
Probot App throwing "Resource Not Accessible By Integration" when trying to merge PRs
I have been trying to create a simple Probot app that amongst other things will merge PRs on certain criteria being met. (I am aware prebuilt solutions are available, however not only do they not ...
1
vote
1
answer
5k
views
Phusion Passenger: Error starting web application - Deploying Probot app (NodeJS) with Plesk nginx
I'm trying to deploy a GitHub Probot App (NodeJS application) to my webserver running Plesk 18.0.27 U1 with the NodeJS Extension 1.3.6-117. When running the probot app on my local machine, the app ...
0
votes
1
answer
65
views
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 "...
1
vote
1
answer
443
views
Unable to implement check in my integration, getting 'map undefined' for create method of checks
I am trying to implement Checks into my GitHub app. My App is built with probot.
I am just not able to implement the checks. I have tried going through the documentation which demonstrate ruby ...
1
vote
2
answers
733
views
How to address the issue of a particular GitHub Integration being not reachable
What happens in general if a GitHub integration is down.
Suppose we have a GitHub App app that validates the pull request. What if that app is down, does GitHub display some message about it.
The ...
0
votes
1
answer
927
views
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 ...
0
votes
1
answer
533
views
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 ...
0
votes
1
answer
333
views
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 ...
1
vote
1
answer
1k
views
Token passed to createTokenAuth is not a string : octokit, auth-token
I am trying to build a GitHub App and following the https://probot.github.io/docs/ and https://octokit.github.io/rest.js/v17#authentication. It is basically a nodejs app.
I have no experience ...
3
votes
1
answer
3k
views
GitHub API - "Get contents" continually returning 404 for valid path
I'm using probot => https://probot.github.io/
I've been developing a GitHub application that analyses a specific .json file in a repo for changes to date strings.
I do this by subscribing to the push ...
0
votes
1
answer
53
views
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-...
1
vote
1
answer
151
views
Show probot logs in Heroku
In a simple Probot app (GitHub App) that is deployed to Heroku, I want to show log messages in the Heroku logs. I'm using the app reference as in the default examples in the Probot docs.
app.log('...
0
votes
1
answer
230
views
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 ...
0
votes
2
answers
641
views
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....
0
votes
1
answer
288
views
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
...
0
votes
1
answer
431
views
Using Probot to create a Github issue on response from express route
Is it possible to use Probot to create an issue on response from an express route? I've tried the following, but they async function can't access context.github.
const createIssue = async function (...
0
votes
1
answer
334
views
How to get names of all branches in repository?
For example, I have five branches in the current repository, and their names are: master, branch1, branch2, branch3, and branch4. Use the typescript language for probot build to get these names.
What ...
0
votes
1
answer
643
views
How can I enable GitHub preview features, like topics?
I'm using Apps - listRepos to get a list of all the repositories installed on my Probot GitHub application.
I want the response data to include the GitHub topics for each repository. This is ...
1
vote
1
answer
386
views
How to correctly configure unit tests for Probot with Scheduler Extension?
I am using the following minimal probot app and try to write Mocha unit tests for it.
Unfortunately, it results in the error below, which indicates that some of my setup for the private key or ...
0
votes
1
answer
341
views
Probot version 7.2 is not starting my app
With probot 7.2, if I create a simple index.js like
module.exports = app => {
app.log('YYYYYYYEEEEEEEEEEEAAAAAAAAAAAHHHHHHHHH it is working!!!!')
}
This export is not working, as when I run the ...
0
votes
2
answers
319
views
Is it possible to perform an action with `context` on the init of the app?
I'm simply looking for something like this
app.on('init', async context => {
...
})
Basically I just need to make to calls to the github API, but I'm not sure there is a way to do it without ...
3
votes
0
answers
222
views
Add label or failing check to Pull Request with (merge) conflict on GitHub?
If you work with GitHub project boards for PR management, it is quite important to be able to know about the status of a PR. Test failures are made available via the read x or green checkmark via ...
6
votes
0
answers
2k
views
GitHub ERROR probot: Integration not found, documentation_url
I had issues with authentication when working with GitHub's Probot app. When I ran the app using npm start, I would get
github: Github request: GET /app/installations - 404 Not Found
and
ERROR ...
2
votes
0
answers
342
views
Probot: How to use probot without proxy?
Currently Probot seems need to use smee.io proxy to work.
How can I use probot framework without proxy? In other words, use ther server IP directly.
0
votes
1
answer
353
views
Tests with Probot API from GitHub and Smee failing to accept payload?
I'm posting some sample data to my Smee endpoint and I am also running a local instance of my ProBot app. I get a bad request in my bot logs and I see this is the Smee response:
{ Error: cannot ...
1
vote
3
answers
790
views
Probot : Octokit baseUrl overriding
Am trying to create a new GitHub(probot) application by going through documentation as mentioned here https://probot.github.io/docs/development/ .
I can get the events from the repository come across ...
0
votes
1
answer
218
views
GitHub Probot : Error deploying Probot app on Now
I cloned wip-bot and tried to deploy the bot on Now.
I followed all the instructions given here (All steps): https://probot.github.io/docs/deployment/#now
However, while deploying I faced the ...
6
votes
1
answer
3k
views
GitHub Probot : ERROR probot : signature does not match event payload and secret
I am trying to build a GitHub app using Probot Framework.
Here's the content of file index.js:
module.exports = (robot) => {
robot.log('Yay, the app was loaded!');
robot.on('*', async context ...
3
votes
1
answer
1k
views
GitHub Probot : ERROR probot: Bad Request
I am developing an application for Probot. I have configured .envand already downloaded PEM file in the folder.
Here is the content of file index.js.
module.exports = (robot) => {
robot.on('...