Code Monkey home page Code Monkey logo

ideas's Introduction

Probot's logo, a cartoon robot

A framework for building GitHub Apps to automate and improve your workflow

npm Build Status Codecov @ProbotTheRobot on Twitter


If you've ever thought, "wouldn't it be cool if GitHub could…"; I'm going to stop you right there. Most features can actually be added via GitHub Apps, which extend GitHub and can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. Apps are first class actors within GitHub.

How it works

Probot is a framework for building GitHub Apps in Node.js, written in TypeScript. GitHub Apps can listen to webhook events sent by a repository or organization. Probot uses its internal event emitter to perform actions based on those events. A simple Probot App might look like this:

export default (app) => {
  app.on("issues.opened", async (context) => {
    const issueComment = context.issue({
      body: "Thanks for opening this issue!",
    });
    return context.octokit.issues.createComment(issueComment);
  });

  app.onAny(async (context) => {
    context.log.info({ event: context.name, action: context.payload.action });
  });

  app.onError(async (error) => {
    app.log.error(error);
  });
};

Building a Probot App

If you've landed in this GitHub repository and are looking to start building your own Probot App, look no further than probot.github.io! The Probot website contains our extensive getting started documentation and will guide you through the set up process.

This repository hosts the code for the npm Probot package which is what all Probot Apps run on. Most folks who land in this repository are likely looking to get started building their own app.

Contributing

Probot is built by people just like you! Most of the interesting things are built with Probot, so consider starting by writing a new app or improving one of the existing ones.

If you're interested in contributing to Probot itself, check out our contributing docs to get started.

Want to discuss with Probot users and contributors? Discuss on GitHub!

Ideas

Have an idea for a cool new GitHub App (built with Probot)? That's great! If you want feedback, help, or just to share it with the world you can do so by creating an issue in the probot/ideas repository!

ideas's People

Contributors

gr2m avatar itaditya avatar jasonetco avatar patcon 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

Watchers

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

ideas's Issues

One newcomer issue per aspiring contributor

A bot that ensures exactly one newcomer issue is assigned per person so that it’s fair for all newcomers. Additionally, it encourages the no-more-newcomers to take up challenging issues once they’re comfortable with the workflow after having tackled a newcomer issue.

P.S. I'm an aspiring RGSoC 2018 scholar and would like to work on it if it's approved.

marks or suggest related Issues

For quite a few OSS, maintainers spend quite a bit of time closing similar issues -- this might require a combination of keyword matching or some machine learning to inform of similar or related issues.

`probot-archive-repo`

From a conversation I had with @JasonEtco:

Quick, someone make a Probot App that adds a verbose “This repo is deprecated” message to the README when a repo is deprecated archived.

Yeah I bet a probot-archive-repo that auto closes all open issues and PRs with a descriptive comment, finds package dependencies’ repos and opens an issue in each one, updates the README, and then archives the repo (if and when there’s an API for it?) would be pretty cool.

there is an API for it already, even has webhooks

Org invite links

Like @benbalter's https://github.com/benbalter/add-to-org, but as a GitHub App.

Once installed on an organization, an org admin can go to the app and fill out a form to create custom invite links for the organization.

The form could include options like:

  • Who can use this link?
    • Anyone
    • Anyone with a foobar.com email address
    • Anyone that's a member of @org/team (requires this app to be installed)
  • How long is the link valid?
    • Forever
    • 1 week
    • 1 month
    • 1 year
  • Add new members to: [select team]

The app could use jsonwebtoken to encode all the configuration options using the app's private key. The encoded token could be used in a URL and shared to allow self-serve access to an organization.

When a user visits that URL, they will OAuth, and then the app can decode the JSON web token and do its thing.

probot-project dictionary

Some key terms used in project are defined by bot as a one-liner then and there as and when. And relevant links for info be added too.

Weekly digest

A bot that summarizes weekly activity in a locked issue. It would comment what issues have been mostly discussed / upvoted, new releases, welcome new contributors, give shoutouts to recurring contributors, etc

Google this

Someone is asking a question in an issue/pr thread whose answer can be found on google.Respond with a gt(google this) : /gt search string will return the link of answer to that question.Saves maintainers time of answering questions that can be found on google easily.

P.S: I am an rgsoc aspirant 2018 and would wish to work on this idea.

Automatic Fork Syncing

Bitbucket has a really nice feature called Automatic Fork Syncing where the branches of forks are automatically kept up to date with their upstream. This saves a lot of time and reduces complexity for developers not used to working with the forking model of git development.

Would it be possible to write a Probot bot that implements this for Github?

Maintain a changelog

Via @benbalter in probot/probot#15


When a pull request is merged, add a line to CHANGELOG.md or HISTORY.md, with the PR title, number, and if the contributor is not a maintainer, give them props, optionally categorizing the updates based on tags.

@jekyllbot does this (with a slightly different behavior that I don't like), but the end result could look somethign like this:

## Head

### Minor

* Make the button red (#123, props @bkeepers)

### Major

* Button is now a switch (#456)

### Development

* Add Rubocop (#789)

Catch-all bot, custom payload UI

A Probot app that catches all webhook events then displays them in a nifty UI.

This came out of a discussion on Slack in which we wished for new features in the webhook/payloads UI (specifically: filtering by user/event, icons for different event types)

I'm sure that the brilliant minds at GitHub will improve their UI, but building our own would allow us to hook into Probot-specific things like displaying the current config file's contents.

cc @bkeepers @jlast

Automatically protect branches that follow a certain pattern

While there are commercial offerings to automatically protect branches that follow a certain naming pattern, I did not find an Open Source solution for this yet. Solutions like Zappr already enforce all kind of rules for already protected branches (like n-eye principle and commit message patterns), but the actual branches have to be protected manually.

The idea would be to have a Probot module that would read its configuration out of a config file in the repositories in question and registers for branch creation events. Whenever a new branch gets created it would check whether the branch name is matching a regular expression specified in the config file.

In later version of this Probot module, one may have more config options per naming pattern (regular expression), e.g. the required status checks, review and code ownership enforcements, the requirement to catch up with the target branch before a merge can happen, etc.

Auto labelling issues

Whenever someone creates an issue we can use NLP techniques to identify whether it is a question, enhancement, bug etc. Based on the sentiments we can also add labels whether it needs immediate attention or much more like that. I would like to work on this and can't wait to get myself started on this.

Voting system for issues

In large repos the maintainers usually have to go through a lot of issues , some of which are legit whereas others are very trivial or don`t require the immediate attention of maintainers and can be solved by anyone. I was thinking if its possible to add a label when an issue receives certain number of thumbs up showing that many users are facing this issue .
The maintainers would be able to sort the issues based on number of thumbs up , making the list priority wise and thus reducing noise .
Let me know if this sounds like a good idea .

Comment-or-update-comment

Not really an app idea, but I think a lot of apps will want to post a comment on a PR/issue then update that comment on subsequent events (rather than posting a new comment). As an example, Codecov has this behavior; it's kind of a pain to write all of that manually, since its very boilerplate-y. It could use the APP_ID and metadata to mark a comment as belonging to the app.

Bot that alerts if issue is assigned to someone

Interested in developing a bot which automatically alerts the assignee when he has been assigned an issue so that the assignee doesn't waste time and can formulate ideas and immediately start working on the assigned issue !

Branching Issue

Sometimes when multiple branch is created and master branch is behind other branches than comparison shows empty result between the master branch and other branch. This also leads to merging issue between the master branch and other branches. Bot may be able to merge the automatically when asked by the user and comparison should be done by the bot on the basis of Time Stamp of branches.

Automatically deploy to Glitch

Memorializing a quick convo w/ @clarkbw @gr2m & @JasonEtco that we had over slack.

@gr2m had already built a dope UI for deploying Probot apps on Glitch but we could make this even cooler if we setup continuous deployment through a probot app and a probot helper that you would install in your app.

Whenever a user creates a slash command on a PR, it would ping the probot app which would ping an endpoint registered by the helper running on glitch which would then pull the latest code into the glitch environment.

Auto-assign maintainer to new issues

From @benbalter in probot/probot#17:

Another behavior of @jekyllbot (that's relatively new), when an issue comes in and @mentions an affinity team, one of the team captains are randomly assigned the issue. They're obviously free to unassigned or change assignment, but it creates a sense of distributed ownership of issues, based on where they are in the codebase.

Enforce use of Issue & PR templates

A bot that requires new Issues & PRs use the template and fill out all the fields.

Cases to account for:

  • Check that the template was actually used instead of deleted by ensuring that keywords are present in the body
  • Check that placeholders in the template were replaced with real text

Update duplicate-issues to also post some open PRs for the issues

I understand that duplicate-issues isn't quite ready yet, however we can update it a bit to be more helpful while its search logic is tweaked.

We can provide links to opened and even merged PRs of the duplicate issue set, this helping both OP & maintainer from looking for them.

@randomdude
Calling Library.someFancyMethod() returns undefined


@probot
Hi, I'm a bot and I worked hard to find similar issues to the one you posted:

  • 1234 someFancyMethod returns undefined
  • 4567 someFancyMethod("Hello") returning undefined
  • 1337 Undefined returned by someFancyMethod

Please go through them to see if your issue is already listed, in which case you may close this issue.

You can also see the pull requests around these issues, here:

  • 136 Add null check for someFancyFunction

@maintainer
Hi @randomdude, please check 2nd link in above comment. It's the same issue. You can track its development in 136, I think it isn't active anymore, maybe you can take it up?

(I omitted hashes to avoid confusion by referencing random issues).

probot-translate-comments

Detect language of commenter/OP and translate it using Google translate/Bing, or at least post link to it (if APIs aren't open/rate limited).

Default languages (not to translate) can stored as a closed issue, which the bot can look up for.

Something like:
"probot/translate-comments/default-languages en-us,es"

Automatically move inactive contributors to an alumni team

Every collaborator on a team with write access is a potential risk. As collaborators become inactive they could be moved to an alumni group with read-access only. That would also help the maintainers to keep an oversight of the amount of active contributors a community has

idea: similar code search in Pull Request

Hello, thank you for good bot framework and good chance to join the developing bot.

I developed on my local.

a GitHub App built with probot that searches files similar to the deleted code in Pull Request.

For check with PullRequest submitter forgot to change the similar code.
This function searches similar code with deleted lines.

Is it fitted for your GSoC topic? If so, I'll publish this.

Twitter Integration

This idea is #- 5 proposed for GSOC 2018

Use GitHub’s Pull Requests & Reviews to collaborate on a shared twitter account. Tweets are simply files in a repository. The GItHub app would enforce the character limit by setting a pull request status. Tweets could be allowed to be scheduled or be queued based on a configured tweet schedule

I would like to work on this.

fix for issue was released

When someone creates an issue on a given project, it is common to close this issue once a PR is merged e.g. into master. However, this fix may be released at a later point in time. It would be awesome if a bot could notify on the issue once referenced commits are part of a new GitHub release.

Background Check Project for GSOC

Idea - Each time someone comments on something in a GitHub repository, the github app checks if the user is new to the project. If they are, the bot loads the most recent ~100 comments and runs a sentiment analysis on it. If any of the comments stand out as aggressive then create an issue in a private repository or a discussion for a configurable team to point the maintainers to the new user’s comment and their comments on other projects that might show that they have been hostile before.

I would like to work on this idea as part of GSOC 2018

Auto-Update Submodules

An app that periodically (or even on push) checks the submodules in a Git repo to see if they need updating. If they do, open up a PR to update those submodules.

Set expectations for response time

Via probot/probot#11:

Acknowledging contributions in a timely matter and setting expectations for response is one of the most important things you can do to keep a contributor engaged. Based on recent activity, a bot should be able to let contributors know when they can expect to receive a response.

idea: semantic pull request titles

Yo, proboteers! 🙌

We're using semantic-release all over the @electron org, and we want to start putting more checks into place to prevent accidentally shipping pull requests that are missing semantic commit messages. Occasionally we end up having to open fake PRs with zero changes just to trigger a release.

@groundwater had a cool idea about how to solve this: What if we could just require that the PR title itself follows semantic conventions? Contributors can more easily update a PR title than they can retroactively edit existing commit messages.

As long the "squash" or "merge commit" PR merging style is being used this would work, right?

This seems like a probot candidate, right?

Status check for PR to depend on issues

In a PR, you write something like

/depends on #23, #24

to show that the PR can only be merged if those issues have been closed. So the bot will have a status check (like CI) if any of those issues are still open. If they are, the "test" is considered failed, so the PR's status will be ❌.

cc @wilhelmklopp

Summarize CI failures

As a maintainer I often receive PRs from the community that fail on CI. Because the PR's author does not get a notification that the build failed, I often end up viewing the build for them, copying the errors, and pasting them into a comment so the author knows what to fix.

This seems like some a bot would be good at!

If such a bot existed, I would use it on electron-apps. See electron/apps#262

Abstract "analyze and react to every line of a PR's diff" probot toolkit

This feels like an abstraction of the linters or of @JasonEtco's todo bot.

Design vision:

  • A PR comes in
  • a bot reads over every single line of the diff
  • the line and its metadata are sent off to be evaluated by a special-purpose tool
  • The results of the evaluation (pass/fail/warn, with comments) are added as comments to the PR
  • The PR is potentially accepted/rejected based on the bot's output (this may be more trouble than it's worth for a style cop)

Usage notes

  • Bring in the probot-line-by-line-analyzer shell
  • Wire up one to many line-analyzer lambdas
  • Standardize some sort of API on what's being passed into the lambdas (like say all the relevant metadata that can make the analysis more meaningful)
  • Potentially wire up the analyzers as Hubot-style plugins if someone wanted to put more than one analyzer in a single probot for whatever reason

Inspiration

Presentation by @bkeepers that heavily referenced the technique of automated copy editing and style suggestions for the GitHub blog, to wit:

image

Brief list of per-line analysis bot ideas

  • Inclusiveness checks (gendered language, vulgarity, etc)
  • Image optimizer/analyzer
  • Accessibility analysis (like the a11y npm package but on a line-by-line basis instead of a total-file basis)
  • spelling checks
  • General code style stuff like column width limits

probot service registry

Just a thought...

As a probot developer, I would like to submit my bot repository URL and have GitHub take care of running the service for me (rather than running my own on Heroku, Now, etc). This would take the burden off me as an individual to keep a bot service running, and give the community more confidence that the bots they're using will be consistently available (i.e. not sleeping, running out of dyno hours, etc).

Make probot.glitch.me an official Probot project

https://github.com/gr2m/glitch-github-app is the code behind https://probot.glitch.me, a web form to create a new Probot App and connect it to a new GitHub app with instructions.

I use it quite a lot myself to quickly "fork" existing probot aps and play around with their code, but there are a few things that could be improved. For example

  • call the Glitch Remix URL in an iframe (if possible), so that the user ends up directly at the form instead of at the Glitch Editor from where they have to press the glitch show button.
  • Instead of providing just the textfield to enter a repository name, it could be prefilled with the apps from https://probot.github.io/apps/. Setting a custom repository would also be an option.
  • It would be nice if I could preset parameters, e.g. for the URL that I want the bot to be based on, but also the permissions. I think the https://github.com/settings/apps/new URL accepts query arguments so we could provide a link to create a new app that has the fields and permissions/event hooks already preset
  • There currently is a bug that the causes the app's dependencies not to be installed correctly. I need to open the terminal and rm -rf node_modules and then npm install again. That was not necessary before, I'm sure we can find out to fix that

That would be a great project for Google / Rails Girls Summer of Code team, too, I think.

Any thoughts on moving https://github.com/gr2m/glitch-github-app to the @probot organization and making it officially a community project? @probot/maintainers

Close milestone when release is published

Suggested by @danielbachhuber in probot/template#12:

When I publish a release where the tag matches the milestone (or is separated by v e.g. v1.0.0 and 1.0.0), it would be helpful to have the milestone automatically closed.

And @johnbillion added:

Added bonus: automatic creation of milestones for the next major, minor, and patch versions if they don't already exist.

Example: I publish 1.2.0. The 1.2.0 milestone is automatically closed, and the 1.2.1, 1.3.0 , and 2.0.0 milestones are automatically created.

Enforce documentation updates if PR adds feature or breaking change

⚠️ This issue is reserved for {Rails Girls | Google} Summer of Code

It will be freed up after February if nobody claimed the issue


This bot can be installed to make sure that documentation is updated whenever code changes. In order for the bot to know that there is a new feature or breaking change it would parse all commit messages using conventional-changelog. The preset option would allow to use one of the officially supported commit message conventions to be used.

If conventional-changelog detects a new feature or a breaking change it will check if the repository's README file was updated (configurable, too). If documentation was not updated it sets status to error, otherwise to success

More ideas

  • look for (configurable) labels like feature or breaking change for pull requests that do not follow the commit message conventions.
  • if a pull request gets squash & merged then bot could do the check after the merge and if documentation was not updated it could create an issue

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.