probot | PR Robot is an automated pending pull requests | Runtime Evironment library
kandi X-RAY | probot Summary
kandi X-RAY | probot Summary
probot is an assistant for your organization's open pull requests, build on top of NodeJS.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of probot
probot Key Features
probot Examples and Code Snippets
Community Discussions
Trending Discussions on probot
QUESTION
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 create a branch so I can pull request later.
Edit: This seems to be the way to do it, but it's confusing.
...ANSWER
Answered 2021-May-30 at 22:31Yes @Siddharth,
The way to do it is as you pointed. I found this good explanation in StackOverflow: Github API - create branch?
Also, using Octokit SDK, you can easily achieve it like this:
QUESTION
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 -
...ANSWER
Answered 2021-Apr-16 at 19:54The logs did not appear because I did not rebuild my app.
Once I've ran yarn build
logs started showing up...
QUESTION
I have My Main Index.js File, Inside That, I have This Code (Imagine Input is !help)
...ANSWER
Answered 2020-Nov-12 at 21:33Just to close the question and get an answer.
a really helpful comment from @worthy Alpaca (all credit to them)
you can just create a new file, that you can name however you want, according to the schema you already have. Inside that file you can then handle whatever parameters you wish to use with that command
QUESTION
I'm developing a Jupyter Book project with my research team on a GitHub repository (I'm a total noob at this but so are they).
Yesterday I came across a few PRs and realized that they all included a '_build' folder in their forks which gets added to the repo when you test jb build MyBook
locally on your clone. I'd like to set up a bot, perhaps with GitHub Actions or ProBot that checks this and either removes the folder from their fork (No harm there) or leaves a comment that the folder should be removed before merging. (The book gets built and deployed by a GitHub-actions workflow)
As far as I can tell, bots of this kind can only check for title, body, and comments but not the contents of the fork itself. Are there tools out there to do this? If not so, please point me in some direction so I can further investigate the matter and perhaps create a workflow of my own.
Thanks in advance!
...ANSWER
Answered 2020-Oct-26 at 05:32Beside adding a .gitignore
, as commented, to incite any contributor to not add a folder, you might consider writing your own GitHub Action in order to reject automatically a PR if the wrong folder is detected.
You can use a GitHub Action like ArangoGutierrez/GoLinty-Action
and adapt it in order to check for a folder in the checked out code.
If the test fails, you can then reject the PR.
QUESTION
I want to set a repository secret via the GitHub REST API. I use the example from the docs:
...ANSWER
Answered 2020-Sep-22 at 15:36The example code was not quite clear what the key
actually is and where you get it. You need the "repository public key" that you get from the /repos/{owner}/{repo}/actions/secrets/public-key
endpoint.
Use the repository public key together with the value from your new secret:
QUESTION
I have the vanilla probot event function from the docs that comments on new issues:
...ANSWER
Answered 2020-Sep-22 at 09:16This was my mistake.
This is the whole probot.event.js
file:
QUESTION
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 cors package:
...ANSWER
Answered 2020-Sep-10 at 03:45You must start the app programmatically. This way you can access the Express app AFTER probot loads but BEFORE Probot starts running:
QUESTION
For a variety of reasons, I need to manually trigger a GitHub Actions run from a comment on a PR mentioning a bot (I’m using ProBot). I figured out how to start the workflow by setting the start to on: workflow_dispatch
and calling the API. Where I’m running into an issue is linking the run to the PR. Right now, the action just starts and completes without ever appearing in the checks section of the PR.
I noticed that there is a checks create method on the API, but it seems more geared towards making your own check suite. I could use that to create a check run, manually watching the GitHub Actions process, and appropriately updating the check run, but it seems like overkill. I haven’t seen anything in The API that would allow this to happen. There may be a way to do it from the action itself too, but I haven’t found anything.
...ANSWER
Answered 2020-Aug-07 at 00:57I don't think you can use workflow_dispatch
to add/update checks on a PR. This seems to be confirmed by this response to a similar question on the community forums.
Checks are only added/updated for the following events:
- pull_request
- pull_request_review
- pull_request_review_comment
- pull_request_target
- push
So your manual operation needs to trigger one of these events to run. There are probably a number of different ways you can do this, depending on your use case. Just as an example, you could call the API to add a label and allow a pull_request
workflow to execute on that type.
QUESTION
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 starts just fine and is accessible via localhost.
Plesk is apparently using the Phusion Passenger application server to serve NodeJS apps.
When accessing the deployed website, I get the following errror:
Screenshot: Passenger problem location
And in /var/log/nginx/error.log
:
ANSWER
Answered 2020-May-31 at 00:31After long research I figured it out myself. Posting my solution in case anyone is dealing with the same problem.
Setting the passenger log level. You can put
passenger_log_level 7
in your nginx configuration/etc/nginx/conf.d/phusion-passenger.conf
(for Plesk)
I started the app as a standalone passenger server and got the actual application stdout output. Example:
cd
in your node app root-folder and runpassenger start --startup-file lib/startup.js --nodejs /opt/plesk/node/12/bin/node --log-level 3 --app-type node
.
At this point I saw the module Probot
couldn't be found in my above mentioned startup script. So I dug a little deeper how a probot app is actually started and stumbled upon the probot run
command. By default a probot app isn't run with node ./lib/index.js
but probot run ./lib/index.js
.
- Using a custom passenger app start command. I added the nginx option
passenger_app_start_command "/opt/plesk/node/12/bin/npm start";
to set the custom start command to use theprobot run
command defined in thepackage.json
start script instead of the defaultnode ./lib/startup.js
from passenger
I learned a lot about these tools and hope this will save someones weekend :D
QUESTION
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 example that includes several different setups(not sure if required with probot). I just got confused with the example there.
Below is the code that resides in my index.js :
...ANSWER
Answered 2020-May-17 at 17:05Would it be possible you need to pass the owner and the repository to context.github.checks.create()
method? I think they are required properties: https://octokit.github.io/rest.js/v17#checks
Also, make sure the Github App has the following permissions: checks:write
(https://developer.github.com/v3/activity/events/types/#checkrunevent)
Also, checking your code snippet, seems that you are not using the mediaType
properly. If you check the type definition, mediaType has the following structure:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install probot
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page