Making a robot via /projects/{project_name_or_id}/robots is broken
This endpoint does not parse permissions correctly:
Try to create a robot in your project via /projects/{project_name_or_id}/robots with this payload:
{
"name": "puller",
"description": "Project puller. Created automatically.",
"expires_at": -1,
"access": [
{
"resource": "repository",
"action": "pull",
"effect": null
}
]
}
This returns 400 with pull action of repository resource not exist in project <project_name>
However creating exactly the same robot via /robots endpoint works perfectly. Working payload:
{
"name": "puller",
"description": "Project puller. Created automatically.",
"level": "project",
"duration": -1,
"permissions": [
{
"access": [
{
"resource": "repository",
"action": "pull",
"effect": null
}
],
"kind": "project",
"namespace": "<project_name>"
}
]
}
can you clarify the problem? It seems that the creation was successfully with the correct payload.
Payload is correct in both examples (it is different since it uses different api ednpoints). But endpoint /robots works, but /projects/{project_name_or_id}/robots does not.
It should succeed in both examples.
To reproduce just try to create a robot via /projects/{project_name_or_id}/robots (a one which haves some permissions) - it's not possible from my testing
I've encountered same problem along with the inability to create project robot accounts under non-admin user (user has Project Admin privilege)
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.