generated from ubiquity/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ubq-testing/development
`Start/Stop` plugin
- Loading branch information
Showing
59 changed files
with
11,221 additions
and
7,652 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
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,2 @@ | ||
SUPABASE_URL= | ||
SUPABASE_KEY= |
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
const { exec } = require("child_process"); | ||
|
||
exec('cspell "**/*"', (error, stdout, stderr) => { | ||
if (error) { | ||
console.error(`exec error: ${error}`); | ||
return; | ||
} | ||
if (stdout) console.log(`stdout: ${stdout}`); | ||
if (stderr) console.error(`stderr: ${stderr}`); | ||
}); |
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,32 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.10.0" | ||
|
||
- name: Enable corepack | ||
run: corepack enable | ||
|
||
- uses: actions/checkout@v4 | ||
- uses: cloudflare/wrangler-action@v3 | ||
with: | ||
wranglerVersion: "3.57.0" | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
secrets: | | ||
SUPABASE_URL | ||
SUPABASE_KEY | ||
env: | ||
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | ||
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} |
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,32 +1,56 @@ | ||
# `@ubiquity/ts-template` | ||
# `@ubiquibot/command-start-stop` | ||
|
||
This template repository includes support for the following: | ||
This plugin allows a hunter to begin a task as well as gracefully stop a task without incurring a negative impact on the hunter's XP or karma. | ||
|
||
- TypeScript | ||
- Environment Variables | ||
- Conventional Commits | ||
- Automatic deployment to Cloudflare Pages | ||
## Usage | ||
|
||
## Testing | ||
### Start a task | ||
|
||
### Cypress | ||
To start a task, a hunter should use the `/start` command. This will assign them to the issue so long as the following is true: | ||
|
||
To test with Cypress Studio UI, run | ||
- Price labels are set on the issue | ||
- The issue is not already assigned | ||
- The hunter has not reached the maximum number of concurrent tasks | ||
- The command is not disabled at the repository or organization level | ||
- TODO: If the hunter meets the required XP requirements | ||
|
||
```shell | ||
yarn cy:open | ||
``` | ||
### Stop a task | ||
|
||
To stop a task, a hunter should use the `/stop` command. This will unassign them from the issue so long as the following is true: | ||
|
||
- The hunter is assigned to the issue | ||
- The command is not disabled at the repository or organization level | ||
- The command is called on the issue, not the associated pull request | ||
|
||
Otherwise to simply run the tests through the console, run | ||
### [Configuration](./src/types/plugin-input.ts) | ||
|
||
```shell | ||
yarn cy:run | ||
#### Note: The command name is `"start"` when configuring your `.ubiquibot-config.yml` file. | ||
|
||
To configure your Ubiquibot to run this plugin, add the following to the `.ubiquibot-config.yml` file in your organization configuration repository. | ||
|
||
```yml | ||
- plugin: http://localhost:4000 # or the URL where the plugin is hosted | ||
name: start-stop | ||
id: start-stop-command | ||
description: "Allows a user to start/stop a task without negative XP impact" | ||
command: "\/start|\/stop" | ||
example: "/start" # or "/stop" | ||
with: | ||
isEnabled: true | ||
timers: | ||
reviewDelayTolerance: 86000 | ||
taskStaleTimeoutDuration: 2580000 | ||
miscellaneous: | ||
maxConcurrentTasks: 3 | ||
startRequiresWallet: true # default is true | ||
``` | ||
# Testing | ||
### Jest | ||
To start Jest tests, run | ||
To run the Jest test suite, run the following command: | ||
```shell | ||
```bash | ||
yarn test | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87
9a7ab87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Caution
Test run failed
Test suite run failed
Failed tests: 0/0. Failed suites: 1/1.
Report generated by 🧪jest coverage report action from 9a7ab87