You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a GitHub action to automatically update projects #467
I tested that the issue is added to the project when:
the release-blocker label is applied
the deferred-blocker label is applied
removing the label doesn't remove the issue from the project
there doesn't seem to be a way to set the type automatically from the action
it can be set manually either in the issue or in the project
it takes about 10-15s before the issue (dis)appears in the project
a manual refresh on the issue is needed before the project (dis)appears in the sidebar
After attempting backports in python/cpython#94477 and python/cpython#94475, the check failed because it couldn't access the secret. After some investigation it turns out that PRs created from forks can't access secrets. In addition, this action would add a check for each job in the PR (currently only one, but I'm planning to add more for the other labels/projects):
Click to see screenshot of the job in the PR checks list
Therefore, I submitted python/cpython#94483 to remove the pull_request trigger and only run the action for issues, solving the issue with the secret and the extra checks in PRs.
Projects now support a workflow to automatically add issues/PRs to projects, even though it seems to have some limitations (e.g. can't set custom fields based on a label, and also limitations based on the account type).
For now I enabled it as a test to the Release and deferred blockers project -- if it works well we could enable it on more projects and get rid of the workflow added in python/cpython#94447.
Also, Triagers can now add issues/PRs to projects directly due to the changes in #460 , as far as I'm aware, so anyone who can add a label can also add directly to the project.
Last time I checked, projects supported a few more features that allowed automatic addition (and possibly removal too) directly from the project settings. If these features are now advanced enough to support our use cases we might even be able to get rid of the workflow.
I now updated the sqlite3 project with the Auto-add to project project workflow and verified that an issue was automatically added to the project when I added the topic-sqlite3 label to it:
As mentioned above, we could go through the existing projects and enable their Auto-add to project workflows (assuming it is a suitable replacement to the current project-updater workflow) and then remove the project-updater workflow (and the github-token that it uses).
Unfortunately there is no project workflow to automatically remove the issue when the label is removed. The project should be listed under the labels on the issue page, so it should be relatively easy for triagers to remove it from there too. Unless this is a common use-case, I'd say it's not worth adding a new workflow, especially if we remove the project-updater.
As mentioned above, we could go through the existing projects and enable their Auto-add to project workflows (assuming it is a suitable replacement to the current project-updater workflow) and then remove the project-updater workflow (and the github-token that it uses).
It seems to work fine, I am +1 on enabling it for all projects and removing the workflow (I can help with that one :-).
Unfortunately there is no project workflow to automatically remove the issue when the label is removed.
I see, we can come back to this in the future if gh adds this functionality.
Activity
ezio-melotti commentedon Sep 15, 2022
auscompgeek commentedon Oct 7, 2022
Would using the pull_request_target trigger work instead?
ezio-melotti commentedon Oct 8, 2022
Even if it does, I'm not sure we want to add PRs to the projects anymore.
ezio-melotti commentedon Mar 16, 2023
Projects now support a workflow to automatically add issues/PRs to projects, even though it seems to have some limitations (e.g. can't set custom fields based on a label, and also limitations based on the account type).
For now I enabled it as a test to the Release and deferred blockers project -- if it works well we could enable it on more projects and get rid of the workflow added in python/cpython#94447.
See:
CAM-Gerlach commentedon Mar 17, 2023
Also, Triagers can now add issues/PRs to projects directly due to the changes in #460 , as far as I'm aware, so anyone who can add a label can also add directly to the project.
StanFromIreland commentedon Apr 25, 2025
It would be handy for the action to remove them too, e.g. at the moment the blockers project is littered with issues that should no longer be there.
Proposed (draft) patch I made
Should I submit it as a pr?
(Note:
remove-from-projectsshould be fine, it is written by a gh employee.)ezio-melotti commentedon May 2, 2025
Last time I checked, projects supported a few more features that allowed automatic addition (and possibly removal too) directly from the project settings. If these features are now advanced enough to support our use cases we might even be able to get rid of the workflow.
Would you be interested in looking into this?
StanFromIreland commentedon May 2, 2025
I presume you mean using-the-built-in-automations ? These appear to be mini workflows that you configure in some way. They support adding items and archiving. They are fine for our use cases.
Unfortunately I cannot help further with this as I don't have permissions to use the button and I cannot open a pr :-(
ezio-melotti commentedon May 10, 2025
I now updated the sqlite3 project with the
Auto-add to projectproject workflow and verified that an issue was automatically added to the project when I added thetopic-sqlite3label to it:As mentioned above, we could go through the existing projects and enable their
Auto-add to projectworkflows (assuming it is a suitable replacement to the currentproject-updaterworkflow) and then remove theproject-updaterworkflow (and thegithub-tokenthat it uses).Unfortunately there is no project workflow to automatically remove the issue when the label is removed. The project should be listed under the labels on the issue page, so it should be relatively easy for triagers to remove it from there too. Unless this is a common use-case, I'd say it's not worth adding a new workflow, especially if we remove the
project-updater.StanFromIreland commentedon May 10, 2025
It seems to work fine, I am +1 on enabling it for all projects and removing the workflow (I can help with that one :-).
I see, we can come back to this in the future if gh adds this functionality.
AA-Turner commentedon Aug 12, 2025
Is this issue still needed?
StanFromIreland commentedon Aug 12, 2025
This is still in progress python/cpython#136831
StanFromIreland commentedon Oct 4, 2025
With python/cpython@37d16f7 complete, closing.