Skip to content

Commit

Permalink
Merge branch 'refactor/general' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Sep 25, 2023
2 parents 3c83d93 + ea3245d commit 71bb60a
Show file tree
Hide file tree
Showing 59 changed files with 1,167 additions and 1,191 deletions.
57 changes: 57 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"useGitignore": true,
"version": "0.2",
"language": "en",
"words": [
"autodetection",
"autopay",
"AUTOPAY",
"bucketid",
"bucketname",
"demilestoned",
"devpool",
"ensname",
"fkey",
"gelato",
"Gelato",
"gollum",
"keccak",
"libsodium",
"logdna",
"LOGDNA",
"mdast",
"Mdast",
"mergeable",
"micromark",
"milestoned",
"Numberish",
"orgname",
"pavlovcik",
"permisson",
"prereleased",
"probot",
"Probot",
"ratelimit",
"rebaseable",
"rerequested",
"scalarmult",
"signoff",
"sortcolumn",
"sortorder",
"supabase",
"Supabase",
"SUPABASE",
"svgs",
"timelabel",
"TURL",
"typebox",
"Ubiqui",
"ubiquibot",
"unarchived",
"Unassigning",
"Upserting",
"URLSAFE",
"vitalik",
"WXDAI"
]
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: "Bounty Proposal"
name: "Task Proposal"
description: Have a suggestion for how to improve UbiquiBot? Let us know!
title: "Bounty Proposal: "
title: "Task Proposal: "

body:
- type: markdown
attributes:
value: |
## Feature Request Form
Thank you for taking the time to file a feature request.
If you register your wallet address, you will be eligible for compensation if this is accepted!
Thank you for taking the time to file a feature request.
If you register your wallet address, you will be eligible for compensation if this is accepted!
Please let us know how we can improve the bot.
- type: textarea
Expand All @@ -17,14 +17,14 @@ body:
description: Please let us know what inspired you to write this proposal. Backlinking to specific comments on GitHub, and leaving a remark about how the bot should have interacted with it is usually sufficient context.
validations:
required: false

- type: textarea
attributes:
label: Describe the solution
description: A clear description of what you want to happen. Add any considered drawbacks.
validations:
required: true

- type: textarea
attributes:
label: Remarks
Expand Down
79 changes: 73 additions & 6 deletions .github/ubiquibot-config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,73 @@
priceMultiplier: 1.5
# newContributorGreeting:
# enabled: true
# header: "Thank you for contributing to UbiquiBot! Please be sure to set your wallet address before completing your first bounty so that the automatic payout upon task completion will work for you."
# helpMenu: true
# footer: "###### Also please star this repository and [@ubiquity/devpool-directory](https://github.com/ubiquity/devpool-directory/) to show your support. It helps a lot!"
privateKeyEncrypted: ""
promotionComment: "<h6>If you've enjoyed your experience in the DevPool, we'd appreciate your support. Follow <a href='https://github.com/ubiquity'>Ubiquity on GitHub</a> and star <a href='https://github.com/ubiquity/devpool-directory'>this repo</a>. Your endorsement means the world to us and helps us grow!</h6><h6>We are excited to announce that the DevPool and UbiquiBot are now available to partners! Our ideal collaborators are globally distributed crypto-native organizations, who actively work on open source on GitHub, and excel in research & development. If you can introduce us to the repository maintainers in these types of companies, we have a special bonus in store for you!</h6>"

evmNetworkId: 100
priceMultiplier: 1
issueCreatorMultiplier: 3
maxConcurrentAssigns: 2
paymentPermitMaxPrice: 1000

disableAnalytics: true
commentIncentives: true
assistivePricing: true
registerWalletWithVerification: false

timeLabels:
- name: "Time: <1 Hour"
- name: "Time: <2 Hours"
- name: "Time: <4 Hours"
- name: "Time: <1 Day"
- name: "Time: <1 Week"

priorityLabels:
- name: "Priority: 1 (Normal)"
- name: "Priority: 2 (Medium)"
- name: "Priority: 3 (High)"
- name: "Priority: 4 (Urgent)"
- name: "Priority: 5 (Emergency)"

incentives:
comment:
elements:
code: 1
img: 0
h1: 1
h2: 1
h3: 1
h4: 1
h5: 1
h6: 1
li: 0.5
a: 1
blockquote: 0
i: 0
totals:
word: 0.1

commandSettings:
- name: start
enabled: true
- name: stop
enabled: true
- name: wallet
enabled: true
- name: payout
enabled: true
- name: multiplier
enabled: true
- name: query
enabled: true
- name: allow
enabled: true
- name: autopay
enabled: true
- name: ask
enabled: true
- name: review
enabled: true

enableAccessControl:
label: true
organization: true

openAITokenLimit: 8000
84 changes: 0 additions & 84 deletions .github/workflows/bot.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/release.yml

This file was deleted.

28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ yarn start:watch
- `DISQUALIFY_TIME`: (optional) Set a custom disqualify time (default: 7 days).
- `OPENAI_API_HOST`: (optional) Set OpenAI host url (default: https://api.openai.com).
- `OPENAI_API_KEY`: Set OpenAI key.
- `CHATGPT_USER_PROMPT_FOR_IMPORTANT_WORDS`: (optional) Set a custom user prompt for finding important words
- `CHATGPT_USER_PROMPT_FOR_IMPORTANT_WORDS`: (optional) Set a custom user prompt for finding important words
(default: "I need your help to find important words (e.g. unique adjectives) from github issue below and I want to parse them easily so please separate them using #(No other contexts needed). Please separate the words by # so I can parse them easily. Please answer simply as I only need the important words. Here is the issue content.\n").
- `CHATGPT_USER_PROMPT_FOR_MEASURE_SIMILARITY`: (optional) Set a custom user prompt for measuring similarity
- `CHATGPT_USER_PROMPT_FOR_MEASURE_SIMILARITY`: (optional) Set a custom user prompt for measuring similarity
(default: 'I have two github issues and I need to measure the possibility of the 2 issues are the same content (No other contents needed and give me only the number in %).\n Give me in number format and add % after the number.\nDo not tell other things since I only need the number (e.g. 85%). Here are two issues:\n 1. "%first%"\n2. "%second%"').
- `SIMILARITY_THRESHOLD`: (optional) Set similarity threshold (default: 80).
- `MEASURE_SIMILARITY_AI_TEMPERATURE`: (optional) Set ChatGPT temperature for measuring similarity (default: 0).
Expand All @@ -48,7 +48,7 @@ Instead, it is recommended to make a copy of the `.env.example` file and replace

1. Go to the [UbiquiBot App Marketplace](https://github.com/marketplace/ubiquibot)
2. Choose a plan and install UbiquiBot on your repository
3. Congratulations! You can now use the UbiquiBot to manage your bounties.
3. Congratulations! You can now use UbiquiBot to manage your tasks.

To test the bot, you can:

Expand All @@ -61,14 +61,14 @@ To test the bot, you can:

`evm-network-id` is ID of the EVM-compatible network that will be used for payouts.

`price-multiplier` is a base number that will be used to calculate bounty price based on the following formula: `price = price-multiplier * time-label-weight * priority-label-weight * 100`
`price-multiplier` is a base number that will be used to calculate task price based on the following formula: `price = price-multiplier * time-label-weight * priority-label-weight * 100`

`time-labels` are labels for marking the time limit of the bounty:
`time-labels` are labels for marking the time limit of the task:

- `name` is a human-readable name
- `value` is number of seconds that corresponds to the time limit of the bounty
- `value` is number of seconds that corresponds to the time limit of the task

`priority-labels` are labels for marking the priority of the bounty:
`priority-labels` are labels for marking the priority of the task:

- `name` is a human-readable name

Expand All @@ -83,7 +83,7 @@ To test the bot, you can:

`disable-analytics` can be `true` or `false` that disables or enables weekly analytics collection by Ubiquity.

`payment-permit-max-price` sets the max amount for automatic payout of bounties when the issue is closed.
`payment-permit-max-price` sets the max amount for automatic payout of tasks when the issue is closed.

`comment-incentives` can be `true` or `false` that enable or disable comment incentives. These are payments generated for comments in the issue by contributors, excluding the assignee.

Expand All @@ -98,7 +98,7 @@ To test the bot, you can:
- `totals`:
- `word` defines reward for each word in the comment

`max-concurrent-assigns` is the maximum number of bounties that can be assigned to a bounty hunter at once. This excludes bounties with delayed or approved pull request reviews.
`max-concurrent-assigns` is the maximum number of tasks that can be assigned to an assignee at once. This excludes tasks with delayed or approved pull request reviews.

`register-wallet-with-verification` can be `true` or `false`. If enabled, it requires a signed message to set wallet address. This prevents users from setting wallet address from centralized exchanges, which would make payments impossible to claim.

Expand Down Expand Up @@ -139,7 +139,7 @@ DISQUALIFY_TIME="7 days" // 7 days
6. Open `localhost:3000` and follow instructions to add the bot to one of your repositories.

At this point the `.env` files auto-fill the empty fields (`PRIVATE_KEY` and `APP_ID`) if it is not previously filled.
Now you can make changes to the repository on GitHub (e.g. add a bounty) and the bot should react.
Now you can make changes to the repository on GitHub (e.g. add a task) and the bot should react.

You can, for example:

Expand All @@ -150,13 +150,13 @@ You can, for example:

## How it works

Bounty bot is built using the [probot](https://probot.github.io/) framework so initially the bot is a github app. But thanks to the [probot/adapter-github-actions](https://github.com/probot/adapter-github-actions) you can also use the bot as a github action.
UbiquiBot is built using the [probot](https://probot.github.io/) framework so initially the bot is a github app. But thanks to the [probot/adapter-github-actions](https://github.com/probot/adapter-github-actions) you can also use the bot as a github action.

You can use the bounty bot as a [github app](https://github.com/marketplace/ubiquibot).
You can use UbiquiBot as a [github app](https://github.com/marketplace/ubiquibot).

When using as a github app the flow is the following:

1. Bounty bot is added to a repository as a github app
1. UbiquiBot is added to a repository as a github app
2. You run the bot "backend" (for example on your local machine)
3. Some event happens in a repository and the bot should react somehow (for example: on adding a time label to an issue the bot should add a price label)
4. Event details are sent to your deployed bot instance (to a webhook URL that was set in github app's settings)
Expand Down Expand Up @@ -197,7 +197,7 @@ Make sure you have your local instance of ubiquibot running.

## Architecture Overview

Bounty bot is built using the [probot](https://probot.github.io/) framework so initially the bot is a github app
UbiquiBot is built using the [probot](https://probot.github.io/) framework so initially the bot is a github app

<pre>
&lt;root&gt;
Expand Down
Loading

0 comments on commit 71bb60a

Please sign in to comment.