Skip to main content

将项添加到你的 project

您的项目可以跟踪草稿议题、议题和拉取请求。

Your project can track draft issues, issues, and pull requests.

Note: A project can contain a maximum of 1,200 items and 10,000 archived items. To learn more about automatically archiving items when they meet specific criteria, see "Archiving items automatically."

Adding issues and pull requests to a project

You can add issues and pull requests to your project individually, automatically, or in bulk. You can also add draft issues which can later be transformed into issues. For more information, see "Creating draft issues."

Note: Timeline events for Projects is currently in beta and subject to change.

When you add an issue or pull request to your project, an event will be added to the issue or pull request's timeline. Timeline events will also be added when you remove issues or pull requests and when changes are made to its status field for those items. Timeline events are only visible to people who have at least read permission for the project. If a change is made by a built-in workflow, the activity will be attributed to @github-project-automation.

Automatically adding issues and pull requests

You can configure a built-in workflow to automatically add issues and pull requests from a repository when they meet specific filter criteria. For more information about configuring a workflow, see "Adding items automatically."

Pasting the URL of an issue or pull request

You can copy the URL of an issue or pull request into your clipboard and paste that into your project.

  1. Place your cursor in the bottom row of the project, next to the . Screenshot showing the bottom row to add an item
  2. Paste the URL of the issue or pull request. Screenshot showing pasting an issue URL to add it to the project
  3. To add the issue or pull request, press Return.

Searching for an issue or pull request

If you know the issue or pull request number or if you know part of the title, you can search for an issue or pull request directly from your project.

  1. Place your cursor in the bottom row of the project, next to the . Screenshot showing the bottom row to add an item
  2. Enter #.
  3. Select the repository where the pull request or issue is located. You can type part of the repository name to narrow down your options. Screenshot showing pasting an issue URL to add it to the project
  4. Select the issue or pull request. You can type part of the title to narrow down your options. Screenshot showing pasting an issue URL to add it to the project

Bulk adding issues and pull requests

You can add multiple issues and pull requests from your project and use filters, such as label:bug, to narrow down your search.

  1. In the bottom row of the project, click . Screenshot showing + button at the bottom of the project
  2. Click Add item from repository. Screenshot showing "add item from repository" menu item
  3. Optionally, to change the repository, click the dropdown and select a repository. You can also search for specific issues and pull requests. Screenshot showing repository dropdown
  4. Select the issues and pull requests you want to add. Screenshot showing selecting issues and pull requests to add
  5. Click Add selected items. Screenshot showing "add selected items" button

Adding multiple issues or pull requests from a repository

You can also add issues and pull requests to your project from a repository's issue and pull request lists.

  1. On GitHub.com, navigate to the repository that contains the issues or pull requests you want to add to your project.
  2. Under your repository name, click Issues or Pull requests. Issues and pull requests tab selection
  3. To the left of each issue title, select the issues that you want to add to your project. Screenshot showing checkbox to select issue or pull request
  4. Optionally, to select every issue or pull request on the page, at the top of the list of issues or pull requests, select all. Screenshot showing checkbox to select all on screen
  5. Above the list of issues or pull requests, click Projects. Screenshot showing projects option
  6. Click the projects you want to add the selected issues or pull requests to. Screenshot showing checkbox to select all on screen

Assigning a project from within an issue or pull request

You can also add an issue or pull request to your project from within the issue or pull request itself.

  1. Navigate to the issue or pull request that you want to add to a project.
  2. In the side bar, click Projects. Screenshot showing "Projects" in the issue sidebar
  3. Select the project that you want to add the issue or pull request to. Screenshot showing selecting a project from the issue sidebar
  4. Optionally, populate the custom fields. Project sidebar

Using the command palette to add an issue or pull request

You can use the command palette when viewing your project to quickly add items.

  1. To open the project command palette, press Command+K (Mac) or Ctrl+K (Windows/Linux).
  2. Start typing "Add items" and press Return.
  3. Optionally, to change the repository, click the dropdown and select a repository. You can also search for specific issues and pull requests. Screenshot showing repository dropdown
  4. Select the issues and pull requests you want to add. Screenshot showing selecting issues and pull requests to add
  5. Click Add selected items. Screenshot showing "add selected items" button

Creating issues

You can quickly create issues without leaving your project. When using a view that is grouped by a field, creating an issue in that group will automatically set the new issue's field to the group's value. For example, if you group your view by "Status", when you create an issue in the "Todo" group, the new issue's "Status" will automatically be set to "Todo."

  1. At the bottom of a table, group of items, or a column in board layout, click .

    Screenshot showing + button at the bottom of the project

  2. Click Create new issue.

    Screenshot showing "Create new issue" menu item

  3. At the top of the "Create new issue" dialog, select the repository where you want the new issue to be created.

    Screenshot showing the repository dropdown menu

  4. Below the repository dropdown, type a title for the new issue.

    Screenshot showing the issue title field

  5. Optionally, use the fields below the title field to set assignees, labels, and milestones, and add the new issue to other projects.

    Screenshot showing the assignee, label, project, and milestone options

  6. Optionally, type a description for your issue.

    Screenshot showing the description field

  7. Optionally, if you want to create more issues, select Create more and the dialog will reopen when you create your issue.

    Screenshot showing the create more checkbox

  8. Click Create.

    Screenshot showing the create button

Creating draft issues

Draft issues are useful to quickly capture ideas. Unlike issues and pull requests that are referenced from your repositories, draft issues exist only in your project.

  1. Place your cursor in the bottom row of the project, next to the . Screenshot showing the bottom row to add an item
  2. Type your idea, then press Enter. Screenshot showing pasting an issue URL to add it to the project
  3. To add body text, click on the title of the draft issue. In the markdown input box that appears, enter the text for the draft issue body, then click Save.

Draft issues can have a title, text body, assignees, and any custom fields from your project. In order to populate the repository, labels, or milestones for a draft issue, you must first convert the draft issue to an issue. For more information, see "Converting draft issues to issues."

Note: Users will not receive notifications when they are assigned to or mentioned in a draft issue unless the draft issue is converted to an issue.