Skip to main content

Archiving items automatically

You can configure your project's built-in workflows to automatically archive items that match a filter.

Note: Project workflow automations must be enabled by an enterprise owner in the enterprise settings page for policies for projects. For more information, see "Enforcing policies for projects in your enterprise."

About automatically archiving items

You can configure your project's built-in workflows to automatically archive items. Archiving items will help you stay below the limit of 1,200 items in each project.

The auto-archive workflow supports a subset of filters. You can use the following filters when configuring your workflow.

QualifierPossible values
isopen, closed, merged, draft, issue, pr
reasoncompleted, reopened, "not planned"
updated<@today-14d (the last 14 days), <@today-3w (the last 3 weeks), <@today-1m (the last month)

GitHub Enterprise Server marks an issue or pull request as updated when it is:

  • Created
  • Reopened
  • Edited
  • Commented
  • Labeled
  • Assignees are updated
  • Milestones are updated
  • Transferred to another repository

Additionally, items are also marked as updated when field values in your project are changed.

When you enable automatic archiving for issues or pull requests, items in your project that already meet your criteria will also be archived. There may be some delay in archiving large numbers of items that already meet the criteria.

Projects also have a limit on the number of archived items they can contain. Your project can contain up to 10,000 archived items. For more information on permanently deleting items, see "Archiving items from your project."

Configuring automatic archiving in your project

  1. Navigate to your project.

  2. In the top-right, click to open the menu.

    Screenshot showing a project's menu bar. The menu icon is highlighted with an orange outline.

  3. In the menu, click Workflows.

  4. In the "Default workflows" list, click Auto-archive items.

  5. In the top right, click Edit.

    Screenshot showing a project's menu bar. The "Edit" button is highlighted with an orange rectangle.

  6. In the "Filters" field, type the filter criteria you want to use to automatically archive items. You can only use the is, reason, and updated filters.

  7. To save your changes and enable the workflow, click Save and turn on workflow.

Further reading