Add forge now API - make status optional in add_forge_now_request_update
Modify the behaviour of add_forge_now_request_update:
- Status becomes optional
- When status in NOT provided, only add the comment to the issue without checking the state chart constistency
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
- Show closed items
Link issues together to show that they're related.
Learn more.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Benoit Chauvet changed milestone to %Automate add forge now [Roadmap - Collect]
changed milestone to %Automate add forge now [Roadmap - Collect]
- Benoit Chauvet assigned to @anlambert
assigned to @anlambert
- Maintainer
After some tests in the docker environment, turns out that feature is already implemented, see below:
$ curl -H "Authorization: Bearer $SWH_TOKEN" -H "Content-Type: application/json" -d '{"forge_type": "gitlab", "forge_url": "https://gitlab.exampl.org", "forge_contact_email": "anlambert@softwareheritage.org", "forge_contact_name": "Antoine Lambert"}' -X POST "http://localhost:5004/api/1/add-forge/request/create/" | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 728 100 564 100 164 12599 3663 --:--:-- --:--:-- --:--:-- 16545 { "id": 2, "inbound_email_address": "add-forge-now+2.1FqF7KtohHTGuTWRytTRaVdgelKuFzWYysG-PTwSneI@example.com", "forge_domain": "gitlab.exampl.org", "status": "PENDING", "submission_date": "2023-08-29T08:58:26.698772Z", "submitter_name": "admin", "submitter_email": "admin@example.org", "submitter_forward_username": false, "forge_type": "gitlab", "forge_url": "https://gitlab.exampl.org", "forge_contact_email": "anlambert@softwareheritage.org", "forge_contact_name": "Antoine Lambert", "forge_contact_comment": "", "last_moderator": "None", "last_modified_date": "2023-08-29T08:58:26.699703Z" } $ curl -H "Authorization: Bearer $SWH_TOKEN" "http://localhost:5004/api/1/add-forge/request/2/get/" | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 734 100 734 0 0 27421 0 --:--:-- --:--:-- --:--:-- 28230 { "request": { "id": 2, "inbound_email_address": "add-forge-now+2.1FqF7KtohHTGuTWRytTRaVdgelKuFzWYysG-PTwSneI@example.com", "forge_domain": "gitlab.exampl.org", "status": "PENDING", "submission_date": "2023-08-29T08:58:26.698772Z", "submitter_name": "admin", "submitter_email": "admin@example.org", "submitter_forward_username": false, "forge_type": "gitlab", "forge_url": "https://gitlab.exampl.org", "forge_contact_email": "anlambert@softwareheritage.org", "forge_contact_name": "Antoine Lambert", "forge_contact_comment": "", "last_moderator": "None", "last_modified_date": "2023-08-29T08:58:26.699703Z" }, "history": [ { "id": 2, "message_source_url": null, "text": "", "actor": "admin", "actor_role": "SUBMITTER", "date": "2023-08-29T08:58:26.699703Z", "new_status": "PENDING" } ] } $ curl -H "Authorization: Bearer $SWH_TOKEN" -H "Content-Type: application/json" -d '{"text": "new comment added"}' -X POST "http://localhost:5004/api/1/add-forge/request/2/update/" | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 594 100 565 100 29 23593 1211 --:--:-- --:--:-- --:--:-- 25826 { "id": 2, "inbound_email_address": "add-forge-now+2.1FqF7KtohHTGuTWRytTRaVdgelKuFzWYysG-PTwSneI@example.com", "forge_domain": "gitlab.exampl.org", "status": "PENDING", "submission_date": "2023-08-29T08:58:26.698772Z", "submitter_name": "admin", "submitter_email": "admin@example.org", "submitter_forward_username": false, "forge_type": "gitlab", "forge_url": "https://gitlab.exampl.org", "forge_contact_email": "anlambert@softwareheritage.org", "forge_contact_name": "Antoine Lambert", "forge_contact_comment": "", "last_moderator": "admin", "last_modified_date": "2023-08-29T09:00:54.392254Z" } $ curl -H "Authorization: Bearer $SWH_TOKEN" "http://localhost:5004/api/1/add-forge/request/2/get/" | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 893 100 893 0 0 30811 0 --:--:-- --:--:-- --:--:-- 31892 { "request": { "id": 2, "inbound_email_address": "add-forge-now+2.1FqF7KtohHTGuTWRytTRaVdgelKuFzWYysG-PTwSneI@example.com", "forge_domain": "gitlab.exampl.org", "status": "PENDING", "submission_date": "2023-08-29T08:58:26.698772Z", "submitter_name": "admin", "submitter_email": "admin@example.org", "submitter_forward_username": false, "forge_type": "gitlab", "forge_url": "https://gitlab.exampl.org", "forge_contact_email": "anlambert@softwareheritage.org", "forge_contact_name": "Antoine Lambert", "forge_contact_comment": "", "last_moderator": "admin", "last_modified_date": "2023-08-29T09:00:54.392254Z" }, "history": [ { "id": 2, "message_source_url": null, "text": "", "actor": "admin", "actor_role": "SUBMITTER", "date": "2023-08-29T08:58:26.699703Z", "new_status": "PENDING" }, { "id": 3, "message_source_url": null, "text": "new comment added", "actor": "admin", "actor_role": "MODERATOR", "date": "2023-08-29T09:00:54.392254Z", "new_status": null } ] }
So closing this.
- Antoine Lambert closed
closed
Please register or sign in to reply