Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboarding v2 #22

Closed
rndquu opened this issue Aug 16, 2024 · 2 comments
Closed

Onboarding v2 #22

rndquu opened this issue Aug 16, 2024 · 2 comments

Comments

@rndquu
Copy link
Member

rndquu commented Aug 16, 2024

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:

  1. Generate a new config for bot v2
  2. Update an existing config
  3. Encrypt plugin parameters (depends on Decrypt sensitive config parameters ubiquity-os/ubiquity-os-kernel#90)
  4. Fetch and display available plugins with options and descriptions (depends on a "marketplace" issue which is not ready yet)
  5. Add an additional step of approves permit2 contract if https://github.com/ubiquibot/conversation-rewards plugin is used

This is a very high level description which might change in the future.

@0x4007
Copy link
Member

0x4007 commented Aug 16, 2024

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, the sha 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 actual sha value you retrieved from the GET 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.

@rndquu
Copy link
Member Author

rndquu commented Nov 7, 2024

Closing in favor of ubiquity-os/ubiquity-os-plugin-installer#6

@rndquu rndquu closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants