Skip to content

Latest commit

 

History

History
156 lines (108 loc) · 4.87 KB

CONTRIBUTING.md

File metadata and controls

156 lines (108 loc) · 4.87 KB

CONTRIBUTING

Getting started

Before you get started, make sure you have:

  • installed a local copy of zulipbot

  • registered an account on the Zulip development server and joined us on the zulipbot stream on the Zulip development server, where most discussion concerning zulipbot takes place

  • read and followed our Code of Conduct as a contributor to create a more collaborative and welcoming environment for development

Opening an issue

Are you trying to report a bug that you found in zulipbot? Do you have suggestions for new features or improvements for zulipbot? These are all great and valid reasons for opening an issue in our GitHub issue tracker, where we maintain a list of issues about zulipbot that need to be fixed. Please provide as much information and details as you can in your issue so we can address your issue properly.

  • If you're trying to report a bug, please describe the problem in depth with any accompanying screenshots or links to where the bug occurred; the more information that is given, the better we can diagnose the problem and fix it.

Claiming an issue

If you see an issue in our issue tracker that you'd like to work on, please claim it by commenting @zulipbot claim on the issue, and @zulipbot will assign you to the issue so you can begin working on it.

Installation

  1. Open your command line interface (CLI).

  2. Clone this repository to your local machine.

    $ git clone https://github.com/zulip/zulipbot.git
  3. Switch to the local copy of this repository.

    $ cd ~/path-to-repo/zulipbot
  4. Install the necessary node packages and dependencies.

    $ npm install
  5. Use the smee.io CLI to redirect GitHub webhook payloads to your locally running application.

    $ smee -u https://smee.io/yourcustomurl -P /github -p 8080
  6. Create a GitHub user account and a GitHub App to test with.

    • See here to check how to authenticate your user account.
    • The Webhook URL in your GitHub App settings should be https://smee.io/yourcustomurl.
  7. Run the bot to ensure that your environment was configured correctly.

    $ npm start

If you encounter any problems during installation, let us know on the zulipbot chat and we can help you out!

Making changes

  1. Create a separate feature branch from the main branch for the changes you plan to make.

  2. Commit your changes, following Zulip's commit discipline practice.

  3. Check if your changes and commits pass all tests:

    $ npm test

    Modify your commits accordingly if your changes don't pass all tests.

  4. Fetch and rebase your changes against upstream:

    $ git fetch upstream

    Fix merge conflicts if necessary.

  5. Push your changes to your fork on GitHub.

    $ git push origin feature-branch-name

    You may need to append + before your feature branch name if you failed to push some refs.

  6. Create a pull request for the changes you made.

    • The base fork should be zulip/zulipbot.

    • The base should be main.

    • The head fork should be the name of your fork (ex: octocat/zulipbot).

    • The compare branch should be the name of your feature branch.

  7. One of the project maintainers will review your pull request and merge it once the pull request's CI checks pass and any concerns about your pull request are settled.

Testing

zulipbot is currently manually tested on private repositories and user accounts while a test suite is being established. Webhook payloads can be delivered to a locally running application using Smee.

Our current test suite consists of GitHub Actions for continuous integration, and we review code quality and consistency with the Eslint linter.

Additional resources