Open gsaslis opened 1 month ago
Issues (HTTPD)
Patches (HTTPD)
Fetch rad project (GET) Check api (GET)
Issues (CLI)
rad issue list
rad issue show <issue-id>
rad issue open
rad issue edit <issue-id>
rad issue state <issue-id>
rad issue assign <issue-id> --add <did> --delete <did>
rad issue label <issue-id> --add <label> --delete <label>
rad issue comment <issue-id>
rad issue react <issue-id>
Patches (CLI)
rad patch list
rad patch show
rad patch label
git push rad
rad patch edit
rad patch edit
rad patch comment
I think we can use rad cob
command to get patches / issues.
To elaborate a little bit we can use :
rad cob list --repo rad:zzvuM1U8E3eSJswMg13YuatjKiU7 --type xyz.radicle.issue
to get a list with issues ids and then with
rad cob show --repo rad:zzvuM1U8E3eSJswMg13YuatjKiU7 --type xyz.radicle.issue --object cf1daa986fd69fadfa50fdce1b2fe7cdc5774e2e
we can get in json format the information of a specific issue
Also for patches we can do
rad cob list --repo rad:zzvuM1U8E3eSJswMg13YuatjKiU7 --type xyz.radicle.patch
and then
rad cob show --repo rad:zzvuM1U8E3eSJswMg13YuatjKiU7 --type xyz.radicle.patch--object cf1daa986fd69fadfa50fdce1b2fe7cdc5774e2e
The only thing that changes is the type
parameter
@Stelios123 please also check the rad cob
commands!
e.g.
rad cob list --repo $(rad .) --type xyz.radicle.patch
curl --location 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/issues' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{
"title":"test",
"description" : "lala",
"labels" : ["test"],
"assignees" : [],
"embeds" : []
}'
Response:
{"success":true,"id":"98a7b0dca39484eb0e0bd7dfba89e8295f29e3ef"}
rad issue open --title --description --labels --assignees
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/issues/98a7b0dca39484eb0e0bd7dfba89e8295f29e3ef' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{
"type":"edit",
"title" : "test2"
}'
Response:
{"success":true,"id":"a1ff328901fca4ebf8f020911ca484adce8f6f10"}
rad issue edit <issue-id>
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/issues/98a7b0dca39484eb0e0bd7dfba89e8295f29e3ef' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"state":{"reason":"other","status":"closed"},"type":"lifecycle"}'
Response:
{"success":true,"id":"b2b12eaa0a30c578253a67276c55d71dec5e9fb3"}
rad issue state <issue-id>
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/issues/98a7b0dca39484eb0e0bd7dfba89e8295f29e3ef' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"type":"assign","assignees":["did:key:z6Mkv7BCz61grUDYDmcQhQVmMdcmZmQu3QjMEuQaW7oxQ4H5"]}'
Response:
{"success":true,"id":"b2b12eaa0a30c578253a67276c55d71dec5e9fb3"}
rad issue assign <issue-id> --add <did> --delete <did>
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/issues/98a7b0dca39484eb0e0bd7dfba89e8295f29e3ef' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"type":"label","labels":["my label"]}'
Response:
{"success": true, "id": "fd67c9a857109570e30ad6b2a3de1490efdb8874"}
rad issue label <issue-id> --add <label> --delete <label>
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/issues/98a7b0dca39484eb0e0bd7dfba89e8295f29e3ef' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"replyTo":"98a7b0dca39484eb0e0bd7dfba89e8295f29e3ef","type":"comment","body":"test","embeds":[]}'
Response:
{"success":true,"id":"d496e1c65c21f3ab0ec0c21eeaaf456ed3fe053e"}
rad issue comment <issue-id> --message --reply-to
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/issues/55632a18157b0c5c765314483576fa314d8c5868' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"body":"test2","type":"comment.edit","embeds":[],"replyTo":"55632a18157b0c5c765314483576fa314d8c5868","id":"c235f1ebbb131f0128a116ce8543b4dcccae921d"}'
Response:
{"success": true, "id": "056460374ceed578f42ef1cb0e2d707f35555c74"}
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/issues/98a7b0dca39484eb0e0bd7dfba89e8295f29e3ef' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"active":true,"reaction":"👎","type":"comment.react","id":"d496e1c65c21f3ab0ec0c21eeaaf456ed3fe053e"}'
Response:
{"success":true,"id":"7c4d18d2a87575df85a8b74ce579e597de1e5f12"}
rad issue react <issue-id> --emoji
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/patches/b805142a305f29c8db168369d541d0cad18b5eaa' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"state":{"reason":"other","status":"draft"},"type":"lifecycle"}'
Response:
{"success": true, "id": "929238769acf3e4c5e74a36f12cb7733e41fd7be"}
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/patches/7ce31bd37ec8c57ba18bb42e9d6936f6c8bdcce3' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"labels":["test"],"type":"label"}'
Response:
{"success": true, "id": "8c18cbe0c756077fee0cbbdadc749fcb5a9219ba"}
rad patch <ID> --add "label" --delete "label"
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/patches/7ce31bd37ec8c57ba18bb42e9d6936f6c8bdcce3' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"type":"revision.comment","body":"test","embeds":[],"revision":"01a5debc9b9756a56cd52f5f3b835f3579a70f0a"}'
Response:
{"success": true, "id": "4b8cf1952dc29502f6b6b47d8d34801b5919f8bf"}
rad patch comment <rev-id>
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/patches/7ce31bd37ec8c57ba18bb42e9d6936f6c8bdcce3' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"body":"test1","type":"revision.comment.edit","comment":"21cf5c67d59836e52cfae070e8362c4d23e8511a","embeds":[],"revision":"01a5debc9b9756a56cd52f5f3b835f3579a70f0a"}'
Response:
{"success": true, "id": "e8281b8256490a307bd7bb3ba64c7fafefbf5ecd"}
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/patches/7ce31bd37ec8c57ba18bb42e9d6936f6c8bdcce3' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer y8WkZfJeHk17CSl2hT35ljNA4tFwbPzW' \
--data '{"comment":"0fcc1302cf37b848eef5735fd1fe359aa3388031","type":"revision.comment.redact","revision":"01a5debc9b9756a56cd52f5f3b835f3579a70f0a"}'
Response:
{"success": true, "id": "c97e2e99255c90e6d051cd86ad9b60a638b03f6c"}
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/patches/7ce31bd37ec8c57ba18bb42e9d6936f6c8bdcce3' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer y8WkZfJeHk17CSl2hT35ljNA4tFwbPzW' \
--data '{"summary":"test","verdict":"accept","revision":"01a5debc9b9756a56cd52f5f3b835f3579a70f0a","type":"review","labels":[]}'
Response:
{"success": true, "id": "f45309a12dd7fa3bfeb942ea1dc3d11522c9a360"}
rad patch review <patch-id>
curl --location 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/patches' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer y8WkZfJeHk17CSl2hT35ljNA4tFwbPzW' \
--data '{"labels":[],"target":"24e8743cbe5f906d498da69b0e74b1e6de166aeb","description":"test","oid":"3b759a49d18689935b8506bbd97f30adff38432f","title":"test"}'
Response:
{"success": true, "id": "e15be962764ebb59191962af446c6682f60b543b"}
git push rad -o patch.message="Define power requirements" -o patch.message="See details." HEAD:refs/patches
curl --location --request PATCH 'http://localhost:8080/api/v1/projects/rad:zzvuM1U8E3eSJswMg13YuatjKiU7/patches/7ce31bd37ec8c57ba18bb42e9d6936f6c8bdcce3' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SgaAu5c7c7wTfEAa8S1UVb9p8rsk42Dm' \
--data '{"active":true,"reaction":"👍","type":"revision.comment.react","comment":"21cf5c67d59836e52cfae070e8362c4d23e8511a","revision":"01a5debc9b9756a56cd52f5f3b835f3579a70f0a"}'
Response:
{"success": true, "id": "38c10fc4e60a43425612432f4b7ba2d040fa7db2"}
curl --location 'http://localhost:8080/api/v1/projects?show=all'
Response
[{"name":"myProject12","description":"","defaultBranch":"master","delegates":[{"id":"did:key:z6Mkv7BCz61grUDYDmcQhQVmMdcmZmQu3QjMEuQaW7oxQ4H5","alias":"stelios"}],"threshold":1,"visibility":{"type":"public"},"head":"24e8743cbe5f906d498da69b0e74b1e6de166aeb","patches":{"open":60,"draft":1,"archived":0,"merged":7},"issues":{"open":6,"closed":3},"id":"rad:zzvuM1U8E3eSJswMg13YuatjKiU7","seeding":23},{"name":"radicle-jetbrains-plugin","description":"The Radicle plugin for Jetbrains IDEs.","defaultBranch":"main","delegates":[{"id":"did:key:z6MkrnXJWPndzPBxpBUaE3L3BnMeWpaQdT1V1FvkoCPFSFS3","alias":"yorgos-laptop"},{"id":"did:key:z6MkpaATbhkGbSMysNomYTFVvKG5bnNKYZ2cCamfoHzX9SnL","alias":"jchrist"},{"id":"did:key:z6Mkv7BCz61grUDYDmcQhQVmMdcmZmQu3QjMEuQaW7oxQ4H5","alias":"stelios"}],"threshold":1,"visibility":{"type":"public"},"head":"b32594864363bed0bf202c01635e981de8395b1b","patches":{"open":5,"draft":0,"archived":6,"merged":72},"issues":{"open":1,"closed":0},"id":"rad:z3WHS4GSf8hChLjGYfPkJY7vCxsBK","seeding":28},{"name":"heartwood","description":"Radicle Heartwood Protocol & Stack","defaultBranch":"master","delegates":[{"id":"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT","alias":"cloudhead"},{"id":"did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW","alias":"cloudhead"},{"id":"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM","alias":"fintohaps"}],"threshold":1,"visibility":{"type":"public"},"head":"8922388caa8ad879bdc2b82267bb5122afb77a1e","patches":{"open":23,"draft":3,"archived":35,"merged":159},"issues":{"open":34,"closed":16},"id":"rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5","seeding":75},{"name":"radicle-ci-integrations-docs","description":"Documentation for Radicle adapters","defaultBranch":"main","delegates":[{"id":"did:key:z6MkkpTPzcq1ybmjQyQpyre15JUeMvZY6toxoZVpLZ8YarsB","alias":"mzampetakis"},{"id":"did:key:z6MkrnXJWPndzPBxpBUaE3L3BnMeWpaQdT1V1FvkoCPFSFS3","alias":"yorgos-laptop"}],"threshold":1,"visibility":{"type":"public"},"head":"5da345ea6809be42beb51090003ef536d0960457","patches":{"open":0,"draft":0,"archived":0,"merged":15},"issues":{"open":0,"closed":0},"id":"rad:z4Uh671FzoooaHjLvmtW9BtGMF9qm","seeding":22},{"name":"radicle-explorer","description":"Radicle web interface","defaultBranch":"master","delegates":[{"id":"did:key:z6MkwPUeUS2fJMfc2HZN1RQTQcTTuhw4HhPySB8JeUg2mVvx","alias":"rudolfs"},{"id":"did:key:z6MkkfM3tPXNPrPevKr3uSiQtHPuwnNhu2yUVjgd2jXVsVz5","alias":"sebastinez"},{"id":"did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW","alias":"cloudhead"},{"id":"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT","alias":"cloudhead"},{"id":"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM","alias":"fintohaps"}],"threshold":1,"visibility":{"type":"public"},"head":"06cc5595c86eaa6a7589543c043ee35caec3b3b0","patches":{"open":3,"draft":3,"archived":44,"merged":325},"issues":{"open":9,"closed":11},"id":"rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5","seeding":57}]
Look at which API endpoints we currently use:
--json
flag ?