19

I would like to Auto Assign an issue to a project in Github. Basically automate the below screenshot for every issue automatically opened. Any ideas?

enter image description here

6 Answers 6

20

There are two natively supported options:

2
  • This should really be the accepted answer now - tried both options above without any luck and wish I saw this sooner! Also, I found that it only requires the repo, and project scopes, not write:org or read:org.
    – Alex Koshy
    Commented Jun 29, 2022 at 4:49
  • @AlexKoshy Oh, right, that has changed for v0.1.0, updated yesterday! I'll update, thanks for pointing it out. Commented Jun 29, 2022 at 13:23
7

You can use create-or-update-project-card to achieve this.

on:
  issues:
    types: [opened]
jobs:
  createCard:
    runs-on: ubuntu-latest
    steps:
      - name: Create or Update Project Card
        uses: peter-evans/create-or-update-project-card@v1
        with:
          project-name: My project
          column-name: My column
2

There is an app Project Bot to automate this because right now it seems like it is not possible to do so with just the GitHub project configuration.

Here is the Project Bot description from it's repo

This bot will automatically add new Issues or Pull Requests to a Project board based on specially formatted Cards in each Column of a Project. It also allows you to customize the rules for moving Issues between Columns.

Here is the project-bot repo: https://github.com/philschatz/project-bot

I hope it helps!

1

I managed to make it work using this workflow.

1

You can configure your project's built-in workflows to automatically add items from repositories that match a filter. https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/adding-items-automatically

enter image description here

0

Check out the Sept. 2021 post "New code review assignment settings and team filtering improvements"

It refers to "Managing code review assignment for your team", which includes:

Routing algorithms

Code review assignments automatically choose and assign reviewers based on one of two possible algorithms.

  • The round robin algorithm chooses reviewers based on who's received the least recent review request, focusing on alternating between all members of the team regardless of the number of outstanding reviews they currently have.

  • The load balance algorithm chooses reviewers based on each member's total number of recent review requests and considers the number of outstanding reviews for each member.
    The load balance algorithm tries to ensure that each team member reviews an equal number of pull requests in any 30 day period.

And now:

New settings give teams more control over the behavior:

  • Limit assignment to only direct members of the team. Previously, team review requests could be assigned to direct members of the team or members of child teams.

  • Continue with automatic assignment even if one or more members of the team are already requested. Previously, a team member who was already requested would be counted as one of the team's automatic review requests.

  • Keep a team assigned to review even if one or more members is newly assigned. Previously, the team review request was always replaced by one or more individual review requests. This would make it difficult to find pull requests where a specific team was requested.

Code review assignments settings can be managed under Team settings > Code review assignment:

https://i2.wp.com/user-images.githubusercontent.com/2503052/134927199-77fbb389-bd6a-46c4-8313-9616683694f6.png?ssl=1

2
  • This is only about assigning to people, yes? Not to Projects?
    – dbreaux
    Commented Nov 12, 2021 at 15:48
  • 1
    @dbreaux True. For team members (within a project) assignment.
    – VonC
    Commented Nov 12, 2021 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.