Co-authored-by: Rachael Sewell <rachmari@github.com> Co-authored-by: Rachael Rose Renk <91027132+rachaelrenk@users.noreply.github.com> Co-authored-by: David Jarzebowski <davidjarzebowski@github.com> Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com> Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com> Co-authored-by: Steve Guntrip <stevecat@github.com> Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com> Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com> Co-authored-by: Torsten Walter <torstenwalter@github.com> Co-authored-by: Henry Mercer <henrymercer@github.com> Co-authored-by: Sarah Edwards <skedwards88@github.com>
4.2 KiB
title, intro, versions, type, topics
| title | intro | versions | type | topics | |||
|---|---|---|---|---|---|---|---|
| Adding items automatically | You can configure your project's built-in workflows to automatically add items from {% ifversion projects-v2-duplicate-auto-add %}repositories{% else%}a repository{% endif %} that match a filter. |
|
tutorial |
|
About automatically adding items
You can configure your project's built-in workflows to automatically add new items as they are created or updated in a repository. You can define a filter to only add items that meet your criteria. {% ifversion projects-v2-duplicate-auto-add %} You can also create multiple auto-add workflows, each workflow can have a unique filter and target a different repository. {% endif %}
When you enable the auto-add workflow, existing items matching your criteria will not be added. The workflow will add items when created or updated if the item matches your filter. For more information on manually adding items, see "AUTOTITLE."
The auto-add workflow supports a subset of filters. You can use the following filters when configuring your workflow.
| Qualifier | Possible values | |
|---|---|---|
is |
open, closed, merged, draft, issue, pr | |
label |
"label name" | |
reason |
completed, reopened, "not planned" | |
assignee |
{% data variables.product.product_name %} username | |
no |
label, assignee, reason |
All filters, other than no, support negation. For example, you could use -label:bug to add issues that do not have the "bug" label.
{% ifversion projects-v2-duplicate-auto-add %}
The auto-add workflow is limited per plan.
| Product | Maximum auto-add workflows |
|---|---|
| {% data variables.product.prodname_free_user %} | 1 |
| {% data variables.product.prodname_pro %} | 5 |
| {% data variables.product.prodname_team %} | 5 |
| {% data variables.product.prodname_ghe_cloud %} | 20 |
| {% data variables.product.prodname_ghe_server %} | 20 |
{% endif %}
Configuring the auto-add workflow in your project
{% data reusables.projects.access-workflows %}
-
In the "Default workflows" list, click Auto-add to project{% ifversion projects-v2-duplicate-auto-add %} or one of the auto-add workflows you have previously duplicated{% endif %}.
-
To start editing the workflow, in the top right, click Edit.
-
Under "Filters", select the repository you want to add items from.
-
Next to the repository selection, type the filter criteria you want items to match before they are automatically added to your project.
-
To enable the new workflow, click Save and turn on workflow.
{% ifversion projects-v2-duplicate-auto-add %}
Duplicating the auto-add workflow
You can create additional duplicates of the auto-add workflow. Each workflow can target a different repository, allowing you to add items from up to four repositories. You can target the same repository with multiple workflows if the filter is unique for each workflow.
Once you have duplicated a workflow, you can click Edit to start making changes to it. For more information, see "Configuring the auto-add workflow in your project."
{% data reusables.projects.access-workflows %}
-
In the list of workflows, next to "Auto-add to project" click {% octicon "kebab-horizontal" %}.
-
In the menu, click {% octicon "duplicate" %} Duplicate workflow.
-
To save your new workflow, when prompted, type the name you want to use for the new workflow.
{% endif %}

