Skip to content

Commit 031dafa

Browse files
committed
feature-296-bugbot-autofix: Update documentation for issues, pull requests, and single actions. Rename sections for clarity, add new topics such as "Labels and branch types," "Workflow setup," and "Examples." Modify existing content to improve organization and accessibility. Update branch_repository.d.ts to ensure consistent status type ordering.
1 parent 4f8f249 commit 031dafa

File tree

16 files changed

+1143
-220
lines changed

16 files changed

+1143
-220
lines changed

build/github_action/src/data/repository/branch_repository.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export declare class BranchRepository {
3333
totalCommits: number;
3434
files: {
3535
filename: string;
36-
status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
36+
status: "modified" | "added" | "removed" | "renamed" | "copied" | "changed" | "unchanged";
3737
additions: number;
3838
deletions: number;
3939
changes: number;

docs.json

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,44 @@
8080
"tab": "issues",
8181
"pages": [
8282
{
83-
"title": "General",
83+
"title": "Overview",
8484
"href": "/issues",
8585
"icon": "book"
8686
},
87+
{
88+
"title": "Labels and branch types",
89+
"href": "/issues/labels-and-branch-types",
90+
"icon": "tag"
91+
},
92+
{
93+
"title": "Workflow setup",
94+
"href": "/issues/workflow-setup",
95+
"icon": "play"
96+
},
97+
{
98+
"title": "Assignees and projects",
99+
"href": "/issues/assignees-and-projects",
100+
"icon": "people"
101+
},
102+
{
103+
"title": "Branch management",
104+
"href": "/issues/branch-management",
105+
"icon": "git-branch"
106+
},
107+
{
108+
"title": "Notifications and auto-close",
109+
"href": "/issues/notifications-and-auto-close",
110+
"icon": "bell"
111+
},
87112
{
88113
"title": "Configuration",
89114
"href": "/issues/configuration",
90115
"icon": "gear"
116+
},
117+
{
118+
"title": "Examples",
119+
"href": "/issues/examples",
120+
"icon": "file-code"
91121
}
92122
]
93123
},
@@ -137,14 +167,29 @@
137167
"icon": "book"
138168
},
139169
{
140-
"title": "Configuration",
141-
"href": "/pull-requests/configuration",
142-
"icon": "gear"
170+
"title": "Workflow setup",
171+
"href": "/pull-requests/workflow-setup",
172+
"icon": "play"
173+
},
174+
{
175+
"title": "Capabilities",
176+
"href": "/pull-requests/capabilities",
177+
"icon": "list"
143178
},
144179
{
145180
"title": "AI PR description",
146181
"href": "/pull-requests/ai-description",
147182
"icon": "file-text"
183+
},
184+
{
185+
"title": "Configuration",
186+
"href": "/pull-requests/configuration",
187+
"icon": "gear"
188+
},
189+
{
190+
"title": "Examples",
191+
"href": "/pull-requests/examples",
192+
"icon": "file-code"
148193
}
149194
]
150195
},
@@ -157,6 +202,11 @@
157202
"href": "/single-actions",
158203
"icon": "play"
159204
},
205+
{
206+
"title": "Available actions",
207+
"href": "/single-actions/available-actions",
208+
"icon": "list"
209+
},
160210
{
161211
"title": "Configuration",
162212
"href": "/single-actions/configuration",
@@ -166,6 +216,11 @@
166216
"title": "Workflow & CLI",
167217
"href": "/single-actions/workflow-and-cli",
168218
"icon": "terminal"
219+
},
220+
{
221+
"title": "Examples",
222+
"href": "/single-actions/examples",
223+
"icon": "file-code"
169224
}
170225
]
171226
},
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Assignees and projects
3+
description: Member assignment and linking issues to GitHub Project boards.
4+
---
5+
6+
# Assignees and projects
7+
8+
Copilot can **assign members** to issues and **link issues to GitHub Project** boards so that new issues are tracked in the right place and have owners.
9+
10+
## Member assignment
11+
12+
When the action runs on an issue (e.g. opened or labeled), it can assign **up to N members** of the organization or repository. This is controlled by **`desired-assignees-count`** (default: `1`, max: `10`).
13+
14+
### How assignees are chosen
15+
16+
- The **issue creator** is assigned first **if** they belong to the organization (or are the repo owner for user repos).
17+
- If you need more than one assignee, the action assigns **additional** members up to `desired-assignees-count`. The exact selection logic (e.g. round-robin, random) depends on the implementation; the goal is to spread work across the team.
18+
19+
### Example
20+
21+
Set the number of assignees in the workflow:
22+
23+
```yaml
24+
- uses: vypdev/copilot@v1
25+
with:
26+
token: ${{ secrets.PAT }}
27+
project-ids: ${{ vars.PROJECT_IDS }}
28+
desired-assignees-count: 1
29+
```
30+
31+
Use a higher value to assign more people (e.g. `2` or `3`), up to the configured maximum.
32+
33+
## Project (board) linking
34+
35+
Linking issues to **GitHub Project** boards requires a **Personal Access Token (PAT)** with access to the repository and to the project(s). The action uses **`project-ids`** to know which boards to link to.
36+
37+
### project-ids
38+
39+
- **Format:** Comma-separated list of **project IDs** (numeric). You find the project ID in the project URL or via the API; it is **not** the project name.
40+
- **Effect:** When the action runs (e.g. on issue opened or edited), it **links the issue** to each of these projects and can **move the issue** to a column (e.g. "Todo", "In Progress") based on **`project-column-issue-created`** and **`project-column-issue-in-progress`** (see [Configuration](/configuration)).
41+
42+
### How many boards?
43+
44+
You can link each issue to **multiple** boards by listing several IDs:
45+
46+
```yaml
47+
- uses: vypdev/copilot@v1
48+
with:
49+
token: ${{ secrets.PAT }}
50+
project-ids: '1,2,3'
51+
```
52+
53+
Use variables or secrets if the IDs differ per environment:
54+
55+
```yaml
56+
project-ids: ${{ vars.PROJECT_IDS }}
57+
```
58+
59+
<Warning>
60+
Linking the issue to a board requires a PAT with **project** (and repository) permissions. See [Authentication](/authentication) for the required scopes.
61+
</Warning>
62+
63+
## Summary
64+
65+
| Input | Purpose | Default |
66+
|-------|---------|---------|
67+
| `desired-assignees-count` | Number of assignees (creator + additional up to this count) | 1 (max 10) |
68+
| `project-ids` | Comma-separated project IDs to link the issue to | — |
69+
70+
## Next steps
71+
72+
- **[Workflow setup](/issues/workflow-setup)** — Enable the action for issue events.
73+
- **[Configuration](/issues/configuration)** — Project columns and all optional parameters.
74+
- **[Examples](/issues/examples)** — Full workflow with assignees and project-ids.

docs/issues/branch-management.mdx

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: Branch management
3+
description: Launcher label, naming conventions, and when branches are created (including hotfix and release).
4+
---
5+
6+
# Branch management
7+
8+
Copilot creates **branches** for issues when the right **labels** are present. For most issue types (feature, bugfix, docs, chore), a **launcher label** (e.g. `branched`) is required unless you set **`branch-management-always: true`**. For **hotfix** and **release**, the branch is created as soon as the type label is present (and the issue creator is a member). This page details the launcher, naming, and special rules.
9+
10+
## Launcher label (when to create the branch)
11+
12+
For **feature**, **bugfix**, **docs**, and **chore** issues, the action does **not** create a branch on issue open by default. A member must add a **launcher label** to trigger branch creation.
13+
14+
| Input | Default | Description |
15+
|-------|---------|-------------|
16+
| **`branch-management-launcher-label`** | `branched` | Label that triggers branch creation when added to an issue that already has a type label (feature, bugfix, docs, chore). |
17+
| **`branch-management-always`** | `false` | If `true`, the action **ignores** the launcher label: it creates the branch as soon as the issue has a type label (e.g. on open or when the type label is added). |
18+
19+
### Example: use the default launcher
20+
21+
Workflow:
22+
23+
```yaml
24+
- uses: vypdev/copilot@v1
25+
with:
26+
token: ${{ secrets.PAT }}
27+
branch-management-launcher-label: branched
28+
```
29+
30+
Flow: Open issue with label `feature` → no branch yet. Add label `branched` → branch `feature/123-title` is created from `develop`.
31+
32+
### Example: create branch without launcher
33+
34+
```yaml
35+
- uses: vypdev/copilot@v1
36+
with:
37+
token: ${{ secrets.PAT }}
38+
branch-management-always: true
39+
```
40+
41+
Flow: Open issue with label `feature` → branch is created immediately (no need to add `branched`).
42+
43+
## Naming conventions
44+
45+
Branch names follow **`<tree>/<issue-number>-<slug>`**. The **tree** is the prefix for the issue type; the **slug** is derived from the issue title (sanitized). You can configure main branch, development branch, and each tree.
46+
47+
| Input | Default | Description |
48+
|-------|---------|-------------|
49+
| `main-branch` | `master` | Main production branch (used as base for hotfix). |
50+
| `development-branch` | `develop` | Development branch (used as base for feature, bugfix, docs, chore, release). |
51+
| `feature-tree` | `feature` | Prefix for feature branches. |
52+
| `bugfix-tree` | `bugfix` | Prefix for bugfix branches. |
53+
| `docs-tree` | `docs` | Prefix for docs branches. |
54+
| `chore-tree` | `chore` | Prefix for chore branches. |
55+
| `hotfix-tree` | `hotfix` | Prefix for hotfix branches. |
56+
| `release-tree` | `release` | Prefix for release branches. |
57+
58+
### Example branch names
59+
60+
- `feature/123-add-user-login`
61+
- `bugfix/456-fix-null-check`
62+
- `hotfix/789-critical-payment-fix`
63+
- `release/10-v1-2-0`
64+
65+
Use **`commit-prefix-transforms`** (e.g. `replace-slash`) so commit message prefixes match your conventions (e.g. `feature-123-add-user-login`). See [Configuration](/configuration).
66+
67+
### Example: custom naming
68+
69+
```yaml
70+
- uses: vypdev/copilot@v1
71+
with:
72+
token: ${{ secrets.PAT }}
73+
main-branch: main
74+
development-branch: dev
75+
feature-tree: feat
76+
bugfix-tree: fix
77+
```
78+
79+
Branches would be e.g. `feat/123-add-login` and `fix/456-fix-bug`, created from `dev` (or `main` for hotfix).
80+
81+
## Hotfix and release: no launcher needed
82+
83+
For **hotfix** and **release**:
84+
85+
- The branch is created **without** requiring the launcher label. As soon as the issue has the `hotfix` or `release` label (and the creator is a member), the action creates the branch.
86+
- **Hotfix** branches are created from **`main-branch`** (at the latest tag).
87+
- **Release** branches are created from **`development-branch`**.
88+
- If a **non-member** opens a hotfix or release issue, the action **closes** the issue to avoid accidental production/release flows.
89+
90+
Adding the **`deploy`** label to a release or hotfix issue **triggers** the workflow named in `release-workflow` or `hotfix-workflow`. Ensure those workflow **filenames** match exactly (e.g. `release_workflow.yml`, `hotfix_workflow.yml`). See [Labels and branch types](/issues/labels-and-branch-types).
91+
92+
## Emoji in issue title
93+
94+
When **`emoji-labeled-title`** is `true` (default), the action can update the issue title to include an emoji based on labels (e.g. 🧑‍💻 when branched). The **`branch-management-emoji`** input (default: 🧑‍💻) is the emoji used for branched issues. See [Configuration](/issues/configuration).
95+
96+
## Next steps
97+
98+
- **[Labels and branch types](/issues/labels-and-branch-types)** — Which labels create which branches.
99+
- **[Workflow setup](/issues/workflow-setup)** — Enable the action for issue events.
100+
- **[Issue types](/issues/type/feature)** — Per-type details (source branch, naming, deploy).

0 commit comments

Comments
 (0)