Skip to content

Commit

Permalink
chore: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Oct 1, 2024
1 parent 83ab58f commit f62781b
Showing 1 changed file with 104 additions and 67 deletions.
171 changes: 104 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,107 @@
# `@ubiquity/ts-template`
# `@ubiquity/sync-configs`

This template repository includes support for the following:
Use ChatGPT to modify our three org configs using plain english!

- TypeScript
- Environment Variables
- Conventional Commits
- Automatic deployment to Cloudflare Pages

## Testing

### Cypress

To test with Cypress Studio UI, run

```shell
yarn cy:open
```

Otherwise, to simply run the tests through the console, run

```shell
yarn cy:run
```

### Jest

To start Jest tests, run

```shell
yarn test
```

## Sync any repository to latest `ts-template`

A bash function that can do this for you:

```bash
sync-branch-to-template() {
local branch_name
branch_name=$(git rev-parse --abbrev-ref HEAD)
local original_remote
original_remote=$(git remote show | head -n 1)

# Add the template remote
git remote add template https://github.com/ubiquity/ts-template

# Fetch from the template remote
git fetch template development

if [ "$branch_name" != "HEAD" ]; then
# Create a new branch and switch to it
git checkout -b "chore/merge-${branch_name}-template"

# Merge the changes from the template remote
git merge template/development --allow-unrelated-histories

# Switch back to the original branch
git checkout "$branch_name"

# Push the changes to the original remote
git push "$original_remote" HEAD:"$branch_name"
else
echo "You are in a detached HEAD state. Please checkout a branch first."
fi

# Remove the template remote
# git remote remove template
}
```
m1:sync-configs nv$ bun run tsx src/
Cloning https://github.com/ubiquity/ubiquibot-config.git
Cloning https://github.com/ubiquity-os/ubiquibot-config.git
Cloning https://github.com/ubiquity-os-marketplace/ubiquibot-config.git
✔ Enter the changes you want to make (in plain English): make sure to set all max concurrent tasks to 3 for
everyy role
Differences for /Users/nv/repos/0x4007/sync-configs/src/repos/ubiquity/.github/.ubiquibot-config.yml:
--- /Users/nv/repos/0x4007/sync-configs/src/repos/ubiquity/.github/.ubiquibot-config.yml 2024-10-01 16:13:28
+++ /Users/nv/repos/0x4007/sync-configs/src/repos/ubiquity/.github/.ubiquibot-config.yml.modified 2024-10-01 16:15:42
@@ -1,3 +1,7 @@
+Sure, here is your modified YAML file:
+
+```yaml
+---
plugins:
- uses:
- plugin: https://ubiquibot-command-start-stop-development.ubiquity.workers.dev
\ No newline at end of file
@@ -6,9 +10,9 @@
taskStaleTimeoutDuration: "30 Days"
startRequiresWallet: true # default is true
maxConcurrentTasks:
- admin: 100
- member: 20
- contributor: 5
+ admin: 3
+ member: 3
+ contributor: 3
- uses:
- plugin: https://ubiquibot-command-wallet-development.ubiquity.workers.dev
- uses:
\ No newline at end of file
@@ -123,3 +127,6 @@
- production
- uses:
- plugin: ubiquibot/issue-comment-embeddings@main
+---
+
+```
\ No newline at end of file

✔ Do you want to apply these changes to https://github.com/ubiquity/ubiquibot-config.git? yes
Changes pushed to https://github.com/ubiquity/ubiquibot-config.git

Differences for /Users/nv/repos/0x4007/sync-configs/src/repos/ubiquity-os/.github/.ubiquibot-config.yml:
--- /Users/nv/repos/0x4007/sync-configs/src/repos/ubiquity-os/.github/.ubiquibot-config.yml 2024-10-01 16:13:30
+++ /Users/nv/repos/0x4007/sync-configs/src/repos/ubiquity-os/.github/.ubiquibot-config.yml.modified 2024-10-01 16:16:32
@@ -1,3 +1,4 @@
+---
plugins:
- uses:
- plugin: https://ubiquity-os-comment-vector-embeddings-development.ubiquity.workers.dev
\ No newline at end of file
@@ -121,6 +122,8 @@
taskStaleTimeoutDuration: "30 Days"
startRequiresWallet: true # default is true
maxConcurrentTasks:
- admin: 100
- member: 20
- contributor: 5
+ admin: 3
+ member: 3
+ contributor: 3
+
+---
\ No newline at end of file

✔ Do you want to apply these changes to https://github.com/ubiquity-os/ubiquibot-config.git? yes
Changes pushed to https://github.com/ubiquity-os/ubiquibot-config.git

Differences for /Users/nv/repos/0x4007/sync-configs/src/repos/ubiquity-os-marketplace/.github/.ubiquibot-config.yml:
--- /Users/nv/repos/0x4007/sync-configs/src/repos/ubiquity-os-marketplace/.github/.ubiquibot-config.yml 2024-10-01 16:13:32
+++ /Users/nv/repos/0x4007/sync-configs/src/repos/ubiquity-os-marketplace/.github/.ubiquibot-config.yml.modified 2024-10-01 16:17:37
@@ -1,3 +1,4 @@
+---
plugins:
- uses:
- plugin: https://ubiquity-os-comment-vector-embeddings-development.ubiquity.workers.dev
\ No newline at end of file
@@ -119,8 +120,9 @@
taskStaleTimeoutDuration: "30 Days"
startRequiresWallet: true # default is true
maxConcurrentTasks:
- admin: 100
- member: 20
- contributor: 5
+ admin: 3
+ member: 3
+ contributor: 3
- uses:
- plugin: ubiquibot/issue-comment-embeddings@development
+---
\ No newline at end of file

✔ Do you want to apply these changes to https://github.com/ubiquity-os-marketplace/ubiquibot-config.git? yes
Changes pushed to https://github.com/ubiquity-os-marketplace/ubiquibot-config.git
undefined
m1:sync-configs nv$
```

0 comments on commit f62781b

Please sign in to comment.