-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,35 +7,61 @@ sidebar_position: 3 | |
There are two approaches to configuring Pixeebot: | ||
|
||
1. **Target Repository Configuration:** | ||
Create a `pixeebot.yaml` file in the `.github` directory of the target repository. Configurations in the target repository will take precedence over other configurations. | ||
Create a `pixeebot.yaml` file in the `.github` directory of the target repository. Configurations in the target repository will take precedence over other configurations. | ||
|
||
2. **Global Repository Configuration:** | ||
Alternatively, you can create the `pixeebot.yaml` file in the `.github` directory of your `.github` repository. This will serve as a global configuration that applies to multiple repositories. | ||
Alternatively, you can create the `pixeebot.yaml` file in the `.github` directory of your `.github` repository. This will serve as a global configuration that applies to multiple repositories. | ||
|
||
## YAML | ||
A typical `.yaml` configuration file might look like this: | ||
|
||
```yaml | ||
ai: | ||
allow_llm_access: true | ||
|
||
assignees: [mary, luis] | ||
``` | ||
## Properties | ||
### `ai` | ||
|
||
Contains settings related to AI functionality. | ||
|
||
#### `allow_llm_access` | ||
Setting to `true` will enable Pixeebot to [send data to a LLM](faqs.md) while analyzing your code. | ||
|
||
Setting to `true` will enable Pixeebot to [send data to an LLM](faqs.md) while analyzing your code. | ||
|
||
> **Note** This is the default configuration upon installation. | ||
|
||
### `assignees` | ||
Setting this field tells Pixeebot which GitHub collaborators from the repository should be assigned when it sends pull requests to the main branch. The bot will randomly select from the list every time a pull request is issued. | ||
## Configuring Automatic Assignment | ||
|
||
To automatically assign **reviewers** to Pixeebot PRs, consider [setting up a `CODEOWNERS` file](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners). | ||
|
||
**Note** | ||
* If no assignees are provided through this configuration, a collaborator may be assigned at random. | ||
* If an assignee provided through this configuration is not a collaborator on the repository, a different collaborator may be assigned at random. | ||
|
||
To automatically assign **users** to Pixeebot PRs, consider creating a GitHub action. Below is an example action that will assign all Pixeebot PRs to the user Octocat: | ||
|
||
```yaml | ||
on: | ||
pull_request: | ||
types: [opened, reopened, ready_for_review] | ||
jobs: | ||
auto-assign: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'pixeebot[bot]' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Assign PR to Collaborators | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const collaborators = ['octocat']; // Replace with actual GitHub usernames | ||
github.rest.issues.addAssignees({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.issue.number, | ||
assignees: collaborators | ||
}) | ||
``` | ||
|
||
To automatically assign reviewers to Pixeebot PRs, consider [setting up a `CODEOWNERS` file](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners). | ||
Please contact us at [email protected] with any questions, or if you would like more options for automatic assignment. |