Skip to content

Add @ubiquity-os-simulant as Collaborator #1

Open
@0x4007

Description

Overview

  • If we add @ubiquity-os-simulant as a collaborator then they can really pretend to be like a normal team member.
  • My vision is that the human user watching the demo could act as "the manager"
  • What this means is that @ubiquity-os-simulant can file the issue, and set a time label as we do in our culture at Ubiquity.
  • Then we can write a comment as @ubiquity-os-simulant saying "Can you please set a priority label?"
  • Once the priority label is set, they can self assign /start and proceed with the script.

Requirements

This would require the demo.ubq.fi client to be able to

  1. invite @ubiquity-os-simulant and
  2. the @ubiquity-os-simulant immediately accepting invitations (listen to invite webhook?)

Based on the research below, we may need a simple Cloudflare Worker that has the PAT, and we can hit its endpoint from demo.ubq.fi to let it know that a new repository was just created and the configuration was pushed by the user.

Then the simulant can open the issue, and send back its completion status to the demo.ubq.fi UI to render the button to start the demo.

Deliverables

  • Cloudflare Worker backend that protects PAT exposure from dao.ubq.fi user.
    • We send the owner/repository that was created and the worker should be able to accept the invite with the PAT, file the issue, and set the time label.
  • Changes to this UI to send an invite
  • Changes to /demo to listen to the Price: label being set so it can /start
    • If another label other than Price: or Priority: set, it can complain and say "No, you should assign a Priority level so the pricing is set!"

ChatGPT on automating invites

However, if the invited user controls their own bot or script, they can automate the acceptance process using the GitHub API. Here’s how they can do it:

Automating Invitation Acceptance via GitHub API

  1. Get pending invitations:
curl -H "Authorization: token YOUR_PERSONAL_ACCESS_TOKEN" \
     -H "Accept: application/vnd.github.v3+json" \
     https://api.github.com/user/memberships/orgs
  1. Accept an invitation (if pending):
curl -X PATCH -H "Authorization: token YOUR_PERSONAL_ACCESS_TOKEN" \
     -H "Accept: application/vnd.github.v3+json" \
     https://api.github.com/user/memberships/orgs/ORG_NAME \
     -d '{"state":"active"}'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Type

No type

Projects

  • Status

    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions