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?
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
There are two natively supported options:
There's an official action to add issues and pull requests to projects (as opposed to the legacy "classic" projects): actions/add-to-project.
Using the action looks roughly like
- uses: actions/[email protected] with: project-url: https://github.com/orgs/{org}/projects/{number} github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} labeled: bug, needs-triage label-operator: OR
where the token requires
repo
andproject
scopes (as of v0.1.0).Issues can be added via an "Auto-add to project" workflow configured in the project itself; this was an Enterprise beta feature in January 2023, and became generally available in March 2023.
You can add only one repository per workflow, and the number of workflows is limited: 1 for free accounts, 5 for Pro/Team, and 20 for Enterprise. If you need more than that, you have to use the action.
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
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!
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
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
:
© 2022 - 2024 — McMap. All rights reserved.
repo
, andproject
scopes, notwrite:org
orread:org
. – Neurilemma