API Reference Bors-NG v0.1.0

Modules

Functionality that is specific to administrators.

The view portion of all administrator-specific functions, such as looking up an arbitrary project by name, or showing the results of red-flag queries.

The top-level OPT application for Bors-NG.

Storage for different runtime constants, basically config evaled in runtime

Routing glue to allow authenticating with GitHub oAuth. BorsNG.Router ensures that users have to go through here. When a user is authenticated, the following items are added to the session

The view glue to perform oAuth authentication, and to get tokens for sockets and APIs from that.

The controller for the batches

Batch details page

Resolve magic comments.

The database-level representation of a "attempt".

A type to represent the attmept state.

A database record for an individual CI run. It corresponds to an item in the status = [] array of bors.toml.

A type to represent the status state.

The database-level representation of a "batch".

A type to represent the batch state.

A module that keeps using definitions for models.

Fetch lists by user (for the users' dashboards).

Keeps user-accessible records of what happens to their repository.

The connection between a project and its reviewers.

A Crash Dump from a Bors Agent.

A GitHub installation.

The connection between a project and its reviewers.

Linker table between the patches that are being run by a batch, and the batch itself.

The connection between a project and its reviewers.

Detailed command log of every patch.

An already-parsed bors command. Represented as a binary Erlang term.

Custom Ecto database migration task to be used in compiled releases.

A module that keeps using definitions for models.

Corresponds to a pull request in GitHub.

Corresponds to a repo in GitHub, as opposed to a repo in Ecto.

A type to represent the permissions of a project member.

An ecto data repository; this process interacts with your persistent database.

A database record for an individual CI run. It corresponds to an item in the status = [] array of bors.toml.

A type to represent the status state.

A user account; each user account in our system has a corresponding GitHub account.

The connection between a patch and users that have been delegated the permission to approve it.

The set of plugs that are always present, including the websocket interceptor and the JSON parser.

Conveniences for translating and building error messages.

Simple error messages, when things crash or no route is found.

A module providing Internationalization with a gettext-based API.

Wrappers around the GitHub REST API.

The structure of GitHub commit data.

The structure of GitHub pull request file

Helper functions for ServerMock for common operations without having to modify state by hand.

The GitHub structure of a detailed user account.

An OAuth2 strategy for GitHub.

This is only used for development and testing.

The structure of GitHub pull requests

The GitHub repository structure.

The GitHub repository structure.

Provides a real connection to GitHub's REST API. This doesn't currently do rate limiting, but it will.

Provides a fake connection to GitHub's REST API.

The GitHub structure of a team account.

The GitHub structure of a user account. This is different from FullUser since this has many fewer fields.

The common wrapper for all pages; namely, the bar along the top and the disclaimer along the bottom.

The controller for the front-page / dashboard.

The dashboard and greeting page.

When a controller detects that the user is doing something they shouldn't, it raises this error.

Shows a list of repositories, a single repository, and the repository's settings page.

Phoenix channel for notifying users when a repository gets a visible change in its list of PRs.

The list of repository's, and each individual repository page.

This module maps from URLs to controllers and plugs. It layers on pre-filters, primarily the session, flash, CSRF protection, secure headers, and user authentication part of the session.

Module with named helpers generated from BorsNG.Router.

The controller for server-related actions such as health checking

The router for push notifications. It goes from "channel names" to "channel modules", and it implements most of the user authentication stuff.

A module that keeps using definitions for controllers, views and so on.

The webhook controller responds to HTTP requests that are initiated from other services (currently, just GitHub).

Parse the GitHub webhook payload (as JSON) and verify the HMAC-SHA1 signature.

An "Attemptor" manages the set of running attempts (that is, "try jobs"). It implements this set of rules

The "Attemptor" manages the project's try branch. This is the registry of each individual attemptor. It starts the attemptor if it doesn't exist, restarts it if it crashes, and logs the crashes because that's needed sometimes.

The supervisor of all of the batchers.

A "Batcher" manages the backlog of batches a project has. It implements this set of rules

The format for bors.toml. It looks like this

Get the bors configuration from a repository. This will use bors.toml, if available, or it will attempt to infer it from other files in the repo.

Get the CODEOWNERS file from the repository

User-readable strings that go in commit messages and comments.

The "Batcher" manages the backlog of batches that each project has. This is the registry of each individual batcher. It starts the batcher if it doesn't exist, restarts it if it crashes, and logs the crashes because that's needed sometimes.

The batcher state machine. It takes a list of status states, and emits a batch state.

The supervisor of all of the batchers.

BranchDeleter controls merged branches removal if delete_merged_branches is true in bors.toml file.

A background task that pulls a full list of opened pull requests from a repo. Patches that don't come up get closed, and patches that don't exist get created.

A background task that pulls a full list of repositories that bors is on. Projects that don't come up get removed, and projects hat don't exist get created.

Mix Tasks

Delete old batches and patches from the database.