Open rndquu opened 1 month ago
Also, perhaps GitHub updated their API but the PUT doesn't work anymore at onboard.ubq.fi. This can be easily handled as part of this task.
We require a SHA parameter.
In the
PUT
request, thesha
should be included in the JSON payload. Here’s an example of how it should look:curl 'https://api.github.com/repos/ubiquity/ubiquibot-config/contents/.github%2Fubiquibot-config.yml' \ -X 'PUT' \ -H 'accept: application/vnd.github.v3+json' \ -H 'authorization: token YOUR_TOKEN' \ -H 'content-type: application/json' \ --data-raw '{ "message": "your commit message", "content": "your_base64_encoded_content", "sha": "your_sha_value_here" }'
Key Points:
- Replace
"your_sha_value_here"
with the actualsha
value you retrieved from theGET
request.- Replace
"your_base64_encoded_content"
with your content encoded in base64.- Ensure that
"your commit message"
reflects the changes you're making.The
sha
is necessary to let GitHub know which specific version of the file you are updating. Without it, the API will return an error because it won't know which version of the file to modify.
Right now
https://onboard.ubq.fi/
generates a bot's config for v1 which is obsolete.As a part of this issue we should update
https://onboard.ubq.fi
to support the following features:This is a very high level description which might change in the future.