Skip to content
Merged

Misc #243

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Lint
on:
- pull_request
- push

permissions:
contents: read
pull-requests: write

jobs:
actionlint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: reviewdog/action-actionlint@v1
markdownlint:
name: markdown
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Run markdownlint
uses: DavidAnson/markdownlint-cli2-action@v21
yamllint:
name: Yamllint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Run Yamllint
uses: frenck/action-yamllint@v1.5.0
with:
strict: true
3 changes: 3 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
MD013:
code_blocks: false
17 changes: 17 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
extends: default

ignore-from-file:
- .gitignore

rules:
indentation:
spaces: 2
line-length: disable
truthy:
check-keys: false
braces:
min-spaces-inside: 1
max-spaces-inside: 1
min-spaces-inside-empty: 0
max-spaces-inside-empty: 0
72 changes: 72 additions & 0 deletions REAMDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Reviewbot

[![MIT Licensed](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Go](https://img.shields.io/badge/language-Go-blue.svg)](https://go.dev/)

An experimental bot that posts pending team review requests to Zulip,
plus a Google Cloud Function that turns GitHub webhooks into Zulip
messages requesting reviews.

## Overview

**Reviewbot** bridges the gap between GitHub pull requests and your
team’s Zulip chat. Whenever code is ready for review, Reviewbot
notifies your Zulip stream or topic, making it easier for teams to
track PRs awaiting attention.

- **GitHub → Zulip Integration:** Converts webhooks into Zulip
messages when PRs need review.
- **Cloud Function Support:** Deployable as a Google Cloud Function
for scalable automation.
- **Team Notifications:** Ensures timely notifications for code review
requests.

## Features

- Monitors GitHub repositories for new or pending PRs.
- Posts relevant review requests in designated Zulip streams/topics.
- Intended for team environments to reduce review friction.
- Written in Go for performance and cloud-native deployment.

## Requirements

- [Go](https://go.dev/) (for development, building, or local running)
- GitHub repository with webhook permissions
- Zulip account, stream, and API information
- [Google Cloud Functions](https://cloud.google.com/functions/)
(optional; for serverless deployment)

## Installation

1. **Clone the Repo**

```bash
git clone https://github.com/reload/reviewbot.git
cd reviewbot
```

2. **Configure**
- Set up your GitHub webhook to point to your Reviewbot endpoint.
- Provide Zulip bot credentials and stream configuration.

3. **Deploy**
- _As a Google Cloud Function_: Follow Google’s deployment
instructions and provide the proper environment variables.
- _Locally_: Run with `go run main.go` (additional configuration
may be needed).

## Usage

- When a pull request is created or marked ready for review in your
GitHub repository:
- Reviewbot receives the webhook, parses it, and posts a structured
message in your Zulip stream/topic requesting review from assigned
users or teams.

## License

MIT © [Reload](https://github.com/reload)

---

_Experimental project. Contributions and feedback welcome!_
2 changes: 1 addition & 1 deletion webhook/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/reload/reviewbot/webhook

go 1.22.12
go 1.21.13

require (
github.com/containrrr/shoutrrr v0.8.0
Expand Down