This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into dev-6
- Loading branch information
Showing
100 changed files
with
4,307 additions
and
1,393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @0xcodercrane | ||
* @0xcodercrane |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: Telegram Group Chat | ||
url: https://t.me/UbiquityDAO/29891 | ||
about: "Join us on Telegram!" | ||
- name: UbiquiBot Development Group Chat | ||
url: https://t.me/UbiquityDAO/31132 | ||
about: "Live chat with us on Telegram!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
<!-- RULES TO CONTRIBUTE TO UBIQUIBOT | ||
1. You must link the issue number e.g. "Resolves #1234" | ||
2. You must link proof that your code works from a test issue on your forked repo e.g. "Quality Assurance https://github.com/user/repo/issues/1#issuecomment-1" | ||
3. Please do not replace the keyword "Resolves" https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword | ||
--> | ||
|
||
Resolves # | ||
|
||
<!-- | ||
- You must link the issue number e.g. "Resolves #1234" | ||
- You must link the QA issue on your forked repo e.g. "QA for #1234" | ||
- Please do not replace the keyword "Resolves" https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword | ||
--> | ||
Quality Assurance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1 @@ | ||
--- | ||
evm-network-id: 100 | ||
base-multiplier: 1500 | ||
time-labels: | ||
- name: "Time: <1 Hour" | ||
weight: 0.125 | ||
value: 3600 | ||
- name: "Time: <1 Day" | ||
weight: 1 | ||
value: 86400 | ||
- name: "Time: <1 Week" | ||
weight: 2 | ||
value: 604800 | ||
- name: "Time: <2 Weeks" | ||
weight: 3 | ||
value: 1209600 | ||
- name: "Time: <1 Month" | ||
weight: 4 | ||
value: 2592000 | ||
priority-labels: | ||
- name: "Priority: 0 (Normal)" | ||
weight: 1 | ||
- name: "Priority: 1 (Medium)" | ||
weight: 2 | ||
- name: "Priority: 2 (High)" | ||
weight: 3 | ||
- name: "Priority: 3 (Urgent)" | ||
weight: 4 | ||
- name: "Priority: 4 (Emergency)" | ||
weight: 5 | ||
auto-pay-mode: true | ||
analytics-mode: true | ||
max-concurrent-bounties: 2 | ||
promotion-comment: "\n<h6>If you enjoy the DevPool experience, please follow <a href='https://github.com/ubiquity'>Ubiquity on GitHub</a> and star <a href='https://github.com/ubiquity/devpool-directory'>this repo</a> to show your support. It helps a lot!</h6>" | ||
price-multiplier: 1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Deploy Log Web App to Cloudflare Worker | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Conventional Commits"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
deployments: write | ||
name: Deploy to Cloudflare Worker | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20.3.0" | ||
|
||
- name: Build TypeScript | ||
run: cd ./log-app && npm install && npm run build | ||
|
||
- name: Publish to Cloudflare Pages | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} | ||
directory: ${{ secrets.LOGGER_WEB_APP_DIRECTORY }} | ||
# Enable Wrangler v3 | ||
wranglerVersion: "3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Pull Request Action | ||
permissions: write-all | ||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
GH_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install jq and yq | ||
run: | | ||
sudo apt-get -y install jq | ||
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq | ||
sudo chmod +x /usr/bin/yq | ||
- name: Get UbiquiBot Token | ||
uses: tibdex/[email protected] | ||
id: get_installation_token | ||
with: | ||
app_id: ${{ secrets.UBIQUITY_BOUNTY_BOT_APP_ID }} | ||
private_key: ${{ secrets.UBIQUITY_BOUNTY_BOT_PRIVATE_KEY }} | ||
|
||
- name: Update Config Params and Create Pull Requests | ||
run: | | ||
urls=$(curl -sSL https://raw.githubusercontent.com/ubiquity/devpool-directory/development/projects.json | jq -r '.urls[]') | ||
for url in $urls | ||
do | ||
repoName=$(basename $url) | ||
ownerName=$(echo $url | awk -F/ '{print $(NF-1)}') | ||
git clone $url $repoName | ||
cd $repoName | ||
defaultBranch=$(git branch --show-current) | ||
# make a branch to update config # | ||
git branch update | ||
git checkout update | ||
curl -sSL https://raw.githubusercontent.com/ubiquity/ubiquibot/development/ubiquibot-config-default.json > default.json | ||
declare -A param_mapping=( | ||
["evm-network-id"]="network-id chain-id" | ||
["price-multiplier"]="base-multiplier" | ||
#add more configs as needed | ||
) | ||
### update configs ### | ||
# Iterate over the mapping and perform updates using sed | ||
for new_param in "${!param_mapping[@]}" | ||
do | ||
old_params="${param_mapping[$new_param]}" | ||
for old_param in $old_params | ||
do | ||
# only update param if the old ones exist | ||
exist_old_param=$(yq "has(\"$old_param\")" .github/ubiquibot-config.yml) | ||
if $exist_old_param; then | ||
yq ".$new_param = .$old_param | del(.$old_param)" .github/ubiquibot-config.yml > temp.yml | ||
mv temp.yml .github/ubiquibot-config.yml | ||
fi | ||
done | ||
# if new param still doesent exist add default from ubiquibot-config-default.json | ||
exist_new_param=$(yq "has(\"$new_param\")" .github/ubiquibot-config.yml) | ||
if ! $exist_new_param; then | ||
echo adding | ||
def_val=$(jq -r ".[\"$new_param\"]" ubiquibot-config-default.json) | ||
yq ".$new_param=$def_val" .github/ubiquibot-config.yml > temp.yml | ||
mv temp.yml .github/ubiquibot-config.yml | ||
fi | ||
done | ||
git config user.email "113181824+UbiquiBot[bot]@users.noreply.github.com" | ||
git config user.name "UbiquiBot[bot]" | ||
git add .github/ubiquibot-config.yml | ||
git commit -m "build: use latest ubiquibot config setup" | ||
git remote set-url origin https://${{ secrets.ADD_TO_PROJECT_PAT }}@github.com/$ownerName/$repoName.git | ||
git push -f origin update | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ steps.get_installation_token.outputs.token }}"\ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/$ownerName/$repoName/pulls \ | ||
-d '{ | ||
"title": "build: use latest ubiquibot config setup", | ||
"base": "'"$defaultBranch"'", | ||
"head": "update" | ||
}' | ||
cd .. | ||
done |
Oops, something went wrong.