Skip to content
Draft
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
24 changes: 23 additions & 1 deletion bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@ Configuration:

This reporter will send detailed information about every **publishable** issue.

## Reporter: Github

Key `reporter` is `github`

Configuration:

- `client_id` : Github App client ID.
- `private_key_pem` : Content of the github App private key.
- `installation_id` : ID of the Github App [installation](https://docs.github.com/en/apps/using-github-apps/installing-your-own-github-app) (integer).
- `analyzers_skipped` : The analyzers that will **not** be published on Phabricator.

This reporter will send detailed information about every **publishable** issue.

You can find more details about the Github reporter setup in the [documentation](/docs/github.md).

## Example configuration

```yaml
Expand All @@ -88,5 +103,12 @@ common:

bot:
REPORTERS:
- reporter: phabricator
- reporter: github
client_id: xxxxxxxxxxxxxxxxxxxx
private_key_pem: |-
-----BEGIN RSA PRIVATE KEY-----
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-----END RSA PRIVATE KEY-----
installation_id: 123456789
```
4 changes: 2 additions & 2 deletions docs/new_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ If you need to edit or create an extra repository, you'll need to use the target

It's pretty easy to create a repository on the backend, there are only 2 fields to fill in:

- the **slug** must match your YAML configuration `name` key, and be unique across all repositories on the database,
- the **url** must match your YAML configuration `url` key, and also be unique across all repositories on the database.
- the **slug** must match your YAML configuration `name` key, and be unique across all repositories on the database,

![](./new_repository_backend.png)
⚠️ The slug field must match the repository path, replacing `/` by `-` in order for the bot to detect it correctly. For example, the slug for the repository `https://github.com/mozilla/test` would be `mozilla-test`.
2 changes: 1 addition & 1 deletion docs/phabricator.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Phabricator

The main goal of the project is to publish issues on Phabricator, so we need a good integration with their API and interface.
The main goal of the project was to publish issues on Phabricator, so we need a good integration with their API and interface.

## Structure

Expand Down
4 changes: 2 additions & 2 deletions docs/publication.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ worker:

Here, the analyzer produces its JSON output as `/builds/worker/clang-tidy.json`, but Taskcluster will expose it on its own public hostname as `https://taskcluster-artifacts.net/<TASK_ID>/<RUN_ID>/public/code-review/clang-tidy.json`

## Publish results on Phabricator
## Publish results

Once your task is triggered with the `code-review` attribute, its analysis artifact will be retrieved automatically by the bot. All issues found will be filtered using those basic rules:

- if the issue is not in a modifided line of a file in the patch, it will be discarded.
- if the issue is in a third party path, it will be discarded.

We have [plans](https://bugzilla.mozilla.org/show_bug.cgi?id=1555721) to remove the first filter, by using a two pass approach and comparing the issues found before vs. after applying the patch.
The bot supports publishing a review to either a Phabricator revision or a Github pull request.

## Troubleshooting

Expand Down