ubiquity / onboard.ubq.fi

onboard.ubq.fi
0 stars 7 forks source link

Generate Default Organization Configuration App #3

Closed 0x4007 closed 6 months ago

0x4007 commented 7 months ago

We should have a simple page that will help new partners generate a basic UbiquiBot organization config with our recommended default settings.

They should be able to login with GitHub and then the bot can handle the rest, which would include creating the ubiquibot-config repository and adding a ubiquibot-config/.github/ubiquibot-config.yml file.

As a side note, I think it makes sense for us to rename the repository to .ubiquibot-config to clearly indicate to our partners that it is meant to be a private repository. I'm not sure how far along we will be in updating all of our infrastructure to accomodate this change, but keep this in mind when you start this task.

github's app installation token

No this can be generated with Octokit. We do that right now in the kernel. We can store the "app private key" in our backend/secrets, as well as the "app id". The user just needs to pass in their installation ID for us to authenticate under their installation

https://github.com/ubiquity/ubiquibot-kernel/blob/af8fe436648aa6012ea885582f5e45c1e97f1bb0/src/github/github-event-handler.ts#L33-L39

@whilefoo and I have been working with this code and the authentication definitely works.


I just realized that we can probably handle this automatically for the user. We can make a "Login with GitHub" button so that we know what organizations they are associated with, then we can look up any overlap with all the organizations that the bot is installed to and then automatically identify the installation ID.

More information here: https://chat.openai.com/c/70e59735-9fde-4c97-814b-e56164a59913

Originally posted by @pavlovcik in https://github.com/ubiquity/pay.ubq.fi/issues/65#issuecomment-1945702584

gentlementlegen commented 7 months ago

@pavlovcik How is it different from the onboarding page that is currently available?

0x4007 commented 7 months ago

The idea is the same but with a more hands-off approach for the user. I think it might be better to start from scratch, but to be honest I'm not deeply familiar with the current state of the onboarding page. I think it might even make sense to make a seperate repository in order to keep code simpler to maintain.

I envision a new experience where the partner just needs to:

  1. add the bot to their org
  2. sign in with github to this app
  3. we have a SaaS style "package" picker i.e. package A, B, C with certain features (plugins) and associated costs enabled
  4. ubiquibot adds the corresponding organization config under .ubiquibot/.github/ubiquibot-config.yml to the package (setup with a collection of plugins) they chose

We could even consider storing the full .yml config in the UI code under each "package" button. Then the app can simply commit that yml in the correct location. This will allow us to update the packages quite easily from within this code.

gentlementlegen commented 6 months ago

What the onboarding page does now is to offer a user adding the bot to their org: image

The part that is missing would be the log in to GitHub to handle private repositories. Do you really want to start something new or shall we use this as a base? Starting from there we could add what you mentioned above.

0x4007 commented 6 months ago

You should do whatever is easiest for you. In the mid term future, I think we should have somebody dedicated on the team to just go through the partner onboard flow 100 times and smooth out the rough edges to make it easier to use.

gentlementlegen commented 6 months ago

/start

ubiquibot[bot] commented 6 months ago

DeadlineSat, Mar 9, 4:44 AM UTC
Registered Wallet 0x0fC1b909ba9265A846b82CF4CE352fc3e7EeB2ED
Tips:
gentlementlegen commented 6 months ago

/stop

ubiquibot[bot] commented 6 months ago
+ You have been unassigned from the task
gentlementlegen commented 6 months ago

@pavlovcik since we are splitting everything into new repositories, this task should be carried out in its own repo https://github.com/ubiquity/onboard.ubq.fi

Corresponding issue: https://github.com/ubiquity/onboard.ubq.fi/issues/2

gentlementlegen commented 6 months ago

/start

ubiquibot[bot] commented 6 months ago
! No price label is set, so this is not ready to be self assigned yet.
gentlementlegen commented 6 months ago

@pavlovcik Seems it doesn't copy un existing labels however, if you don't mind setting them again

0x4007 commented 6 months ago

When initializing a new repo's assistive pricing labels (price, time, priority) you need to toggle any label to signal to the bot that they must be generated.

After that you should replicate the labels as they were on the previous repository (only for if you transfer) later when you lead your own repo(s) you will be granted the authority to set your own priority levels.

For now just set time levels and let the repo "codeowner" set priority levels. With those two parameters pricing can be generated.

ubiquibot[bot] commented 6 months ago
! action has an uncaught error
0x4007 commented 6 months ago

Almost- you weren't supposed to actually create labels. I usually use "good for first issue" label. I enable it, wait for it to post to the issue, and then disable it.

The label event tells the bot to check if the labels exist. If they don't it will create them in series. You can come back and try again in about ten seconds and all the necessary labels should be there.

ubiquibot[bot] commented 6 months ago
! action has an uncaught error
gentlementlegen commented 6 months ago

Almost- you weren't supposed to actually create labels. I usually use "good for first issue" label. I enable it, wait for it to post to the issue, and then disable it.

The label event tells the bot to check if the labels exist. If they don't it will create them in series. You can come back and try again in about ten seconds and all the necessary labels should be there.

Sorry first time doing this. Thanks for your help. Maybe could be added in the README as a manual somewhere?

gentlementlegen commented 6 months ago

/start

ubiquibot[bot] commented 6 months ago

DeadlineSat, Mar 9, 5:36 AM UTC
Registered Wallet 0x0fC1b909ba9265A846b82CF4CE352fc3e7EeB2ED
Tips:
molecula451 commented 6 months ago

@pavlovcik since we are splitting everything into new repositories, this task should be carried out in its own repo https://github.com/ubiquity/onboard.ubq.fi

Corresponding issue: #2

First issue of the newly refactored repo, we did it team 🎉

ubiquibot[bot] commented 6 months ago
+ Evaluating results. Please wait...
ubiquibot[bot] commented 6 months ago

[ 115.6 WXDAI ]

@pavlovcik
Contributions Overview
ViewContributionCountReward
IssueSpecification127.8
IssueComment483
ReviewComment14.8
Conversation Incentives
CommentFormattingRelevanceReward
We should have a simple page that will help new partners generat...
27.8
code:
  count: 3
  score: "3"
  words: 10
hr:
  count: 1
  score: "1"
  words: 0
127.8
The idea is the same but with a more hands-off approach for the ...
41.6
li:
  count: 4
  score: "4"
  words: 61
code:
  count: 3
  score: "3"
  words: 7
0.7441.6
You should do whatever is easiest for you. In the mid term futur...
90.6059
When initializing a new repo's assistive pricing labels (price, ...
17.80.7117.8
Almost- you weren't supposed to actually create labels. I usuall...
14.60.70514.6
All looking good thanks. When you implement requested changes yo...
4.80.664.8

[ 880.1 WXDAI ]

@FernandVEYRIER
Contributions Overview
ViewContributionCountReward
IssueTask1800
IssueComment50
IssueComment515.7
ReviewComment132.2
ReviewComment132.2
Conversation Incentives
CommentFormattingRelevanceReward
@pavlovcik How is it different from the `onboarding` page that i...
-
code:
  count: 1
  score: "0"
  words: 1
0.75-
What the onboarding page does now is to offer a user adding the ...
-0.63-
@pavlovcik since we are splitting everything into new repositori...
-0.745-
@pavlovcik Seems it doesn't copy un existing labels however, if ...
-0.67-
> Almost- you weren't supposed to actually create labels. I usua...
-0.715-
@pavlovcik How is it different from the `onboarding` page that i...
2.3
code:
  count: 1
  score: "1"
  words: 1
0.752.3
What the onboarding page does now is to offer a user adding the ...
5.90.635.9
@pavlovcik since we are splitting everything into new repositori...
3.70.7453.7
@pavlovcik Seems it doesn't copy un existing labels however, if ...
1.80.671.8
> Almost- you weren't supposed to actually create labels. I usua...
20.7152
## What would be needed for the deployment to work `FRONTEND_UR...
32.2
h2:
  count: 3
  score: "3"
  words: 17
code:
  count: 2
  score: "2"
  words: 1
0.7832.2
## What would be needed for the deployment to work `FRONTEND_UR...
32.2
h2:
  count: 3
  score: "3"
  words: 17
code:
  count: 2
  score: "2"
  words: 1
0.7832.2

[ 1.1 WXDAI ]

@molecula451
Contributions Overview
ViewContributionCountReward
IssueComment11.1
Conversation Incentives
CommentFormattingRelevanceReward
> @pavlovcik since we are splitting everything into new reposito...
1.10.7851.1