Software factory / Issues
Assign each new item to an expert
New issues and pull requests sit with no owner until a person picks them up. You want each new item to go to the people who know that part of the code.
3 min read
The Assign agent reads each new item and assigns the people who know that part of the code. You need admin access to the repository.
1. Check the experts and the code owners
Assign picks only from these people:
- The people with an entry on the Experts page.
- The code owners in the CODEOWNERS file of the default branch. A team rule counts for each member of the team.
Make sure that the right people are there before you turn it on.
2. Turn on Assign
- Open Agents. In the sidebar, click Agents under Software factory.
- Turn on the switch of Assign. It saves at once.
3. Pick the mode
- Click Settings next to the switch, and set Mode to Act or Suggest (comment only). The default is Act.
- Click Save Assign.
| Mode | What Assign does |
|---|---|
| Act | Assigns the people as the bot. Each person gets a note that says why, under their name in the sidebar. It posts no comment. |
| Suggest (comment only) | Posts one comment that names the people and says why. It assigns nobody. |
Done
Each new issue and pull request gets up to 2 experts or code owners as assignees, or one comment that names them.
When Assign runs
Assign runs one time on each item, at one of these moments:
- A new issue or pull request shows. If screening holds the item, Assign waits until a maintainer shows it.
- A draft pull request becomes ready for review.
An edit, a label or a push does not start it again. It does not run on the items of a banned author, or on an item that has an assignee already.
What Assign reads
The agent reads the item, the active expert entries and the active code owners. A person is active while they have the triage role or more.
- For a pull request, it also gets the changed files. For each person, it gets the changed files that they take, by their expert paths and by the CODEOWNERS rules.
- For an issue, it can search the code to find the files of the problem.
The limits of Act
In the mode Act, code keeps these limits, whatever the item or the model says:
- It assigns at most 2 people.
- It assigns only active experts and active code owners.
- It never assigns the author of the item.
- If the item has an assignee already, it assigns nobody.
The verdicts
The Assign row of the Factory panel shows its verdict:
| Verdict | The run shows | Meaning |
|---|---|---|
assigned | Assigned | The people are assigned, each with a note. |
suggested | Suggested | The comment names the people. |
no-match | No match | No expert or code owner fits the item. Assign does nothing. |
skipped | Skipped | Someone assigned the item while the run worked. Nobody else is assigned. |