Git Product home page Git Product logo

zulipbot's Introduction

zulipbot

Build status GitHub release GitHub license project chat

@zulipbot is a GitHub workflow bot application for the Zulip organization and its repositories. Written in Node.js, the bot manages issues and pull requests in the repository in order to create a better workflow for Zulip contributors.

zulipbot's purpose is to work around various limitations in GitHub’s binary permissions and notifications systems to create a better workflow for our contributors. It allows anyone to perform issue triage (self-assigning and labeling issues), not just the core contributors trusted with full write access to the repository (which is the only model GitHub supports). Additionally, zulipbot monitors the activity of issues and pull requests, notifying contributors about new merge conflicts, continuous integration build results, inactivity, and more.

Installation

To install a copy of zulipbot on your own GitHub repository, please visit the Installation page on the zulipbot wiki.

Usage

If you're using the Zulip project configuration (./config/config-example.js), see zulipbot's usage instructions on the Zulip documentation.

If you're using your own custom configuration (./config/config.js is different from the Zulip project configuration), please visit the Commands page on the zulipbot wiki.

Contributing

If you wish to contribute to zulipbot, please read our contributing guidelines for more information.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The software includes some works released by third parties under other free and open source licenses. Those works are redistributed under the license terms under which the works were received.

zulipbot's People

Contributors

alexmv avatar alya avatar andersk avatar dependabot[bot] avatar drrosa avatar garg3133 avatar lonerz avatar raghavluthra20 avatar rht avatar sayyedarib avatar synicalsyntax avatar timabbott avatar yagogg avatar zulipbot 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zulipbot's Issues

Add linter(s) to Travis-CI

It always a good idea to set up a linter for code readability and quality, since this repository doesn't has a linter yet, so I'd recommend to set up it.

I'd recommend eslint for this repo, since it supports ES6 and works with some framework like CommonJS, and easy to configure. Any thoughts for this? like rules for the linter, or recommend another linter.

Check for issue or PR during labeling

When PRs/issues are labelled, zulipbot often leaves a comment concerning the status of the labeling, such as when invalid labels are added/removed (addLabels.js + removeLabels.js) and when area labels are added (issueAreaLabeled.js). zulipbot should check whether it is commenting on an issue or pull request.

(Description added by @synicalsyntax)

Check repos for unlabeled issues and remind issue creator to label them

When new contributors create new issues, they usually don't label their issues appropriately even though they can do so through the @zulipbot label command.

A new feature can be developed that scrapes unlabeled issues in the repository and remind the issue creator to label them if they're still unlabeled one hour after their creation.

Maybe once #56 is implemented we could suggest possible labels that the issue creator could add to the issue depending on the contents of the issue?

Removing label

There should probably be a way to remove labels also, now that we have a way to add labels.

Create website for zulipbot

Fun fact: zulipbot is deployed on the https://zulip.org/zulipbot/ page.

When you visit it, you get redirected to this repository (relevant lines 18-20 in src/index.js). It'd be nice to set up a website to introduce zulipbot and its features as well as link back to this repository, which would make contributions to zulipbot more welcoming, I think.

Thoughts?

Demo

To claim an issue on the repository, comment "@zulipbot claim-issue" on
the issue you want to claim, and @zulipbot will add the "in progress"
label and assign you as an assignee to the issue

Remove assignee and "in progress" label for inactive claimed issues

For claimed/in progress issues that have been inactive (no comments, no pull requests referenced, etc.) for a week, @zulipbot should ask the assignee whether they are still working on it.

If the assignee doesn't respond with "Yes I'm still working on it" or something similar within a time limit of the prompt, zulipbot remove the assignee and in progress label from the issue to allow other people to work on it.

Get rid of duplicate code

We should get rid of duplicate things and create functions for them, especially the following:

  • create comment function
  • authentication (??)
  • getting issue labels

For the future:

  • getting labels in a repo
  • remove label function (we can actually just use replace label function)
  • add label function

Feedback would be nice and any other suggestions for duplicate functions. The one that should be taken care of is a comment function.

Collaborator test

Testing automatically giving read-only collaborator access to those who want to claim an issue but aren't marked as collaborators.

Make zulipbot customizable for community use

Currently a lot of settings for zulipbot are hardcoded, ranging from comment escaping to the inactivity times to the area labels.

Since @brainwane is presenting about zulipbot in about a week, I think it'd be great if we could make zulipbot more customizable in case others want to use their own copy of zulipbot to collaborate on their repositories. To make this possible, we would need to refactor the code to make configuration options for enabling/disabling all zulipbot features and some other settings like area labels/inactivity times.

Currently supported options (updated 3/17)

  • Username
  • Password
  • Area labels & teams
  • Inactive issue/PR time limit
  • Abandon issue time limit
  • Travis webhook notifications (for finished build statuses)
  • Travis updates label name
  • Self-labeling (only issue/PR authors can manage their issue/PR labels with @zulipbot label & @zulipbot remove
  • Inactivity check timeout (how often zulipbot checks for inactive issues/PRs)
  • Enable/disable adding in progress label to claimed issues
  • Custom in progress label name
  • Enable/disable inactive issue/PR tracking
  • Repository access when collaborator is added (pull, push, write, etc.)
  • Comment templates
  • Enable/disable PR "review"/"needs review" system
  • Label names of PR "review"/"needs review" system

Post at most one area message per area per conversation.

If you write a comment on a PR that references an issue in area X, zulipbot adds a message to the PR saying "hey folks in area X, check it out", which is great.
If you add another comment that references a different issue in area X, it would be great if zulipbot did not add another "hey folks in area X, check it out" message.
zulip/zulip#3946 is an example of where this happened.

zulipbot remind PR creator that PR has been reviewed after some time

  • After a review is made, mark a PR with the "reviewed" label. zulipbot should periodically scrape repos for PRs with the "reviewed" label and remind PR creator that they should update their PR after a certain time.

  • Issues that haven't received any reviews should have a "needs review" label.

  • After a certain period of time PRs labeled "needs review" should mention the PR reviewers (assignees)

More details here.

Description edited by @synicalsyntax

Adding area label support to pull requests

Mention the corresponding area label team and label PR with area label when PR mentions another issue.

  • Check body for newly created pull request
  • Check body for pull request (issue) comment
  • Check body for pull request review
  • Check body for pull request review comment

Avoid automatic subscription when claiming an issue for the first time

Description

If you claim an issue with @zulipbot claim for the first time, you are automatically subscribed to the repo (i.e. you start watching it). Therefore, you receive email notifications for everything that happens in the repo, which is a bit annoying, and might be slightly intimidating for new contributors.

Additional information

The hypothesis here is that being added as a contributor implies becoming a watcher for that repo.

A temporary workaround for this could be adding a message with a link to remove the subscription (e.g. https://github.com/zulip/zulip/subscription), but it'd be great if we could directly avoid this. Maybe it can be done when calling GitHub's API?

Standardize zulipbot name

I think we agreed to use "zulipbot" all lowercase instead of "Zulipbot". We should probably change all the spellings to match "zulipbot" now.

Claim task should get rid of "help wanted" label

When someone claims a task, the "help wanted" label should be removed (first check if it even exists). However, when someone abandons an issue, we should consider adding the "help wanted" label... Need feedback on this.

Limit functions to one comment for every payload event

issueReferenced and issueAreaLabeled all post multiple comments when triggered, which might be annoying for the area label teams mentioned as well as the issue creator; like joinLabelTeam, addLabels, and removeLabels, we can easily concatenate the related area labels into strings instead of printing one comment for every element in the array.

  • issueReferenced
  • issueAreaLabeled

@zulipbot claim

Set up continuous integration

We could set up at least a continuous integration for this repository like Travis-CI that runs linters, unit tests, etc.

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.