mirror of
https://github.com/tauri-apps/tauri-github-bot.git
synced 2026-01-31 00:35:20 +01:00
refactor: rename repo to tauri-github-bot
This commit is contained in:
18
.github/workflows/deploy.yml
vendored
18
.github/workflows/deploy.yml
vendored
@@ -8,21 +8,15 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [16]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: pnpm/action-setup@v2.2.2
|
||||||
|
with:
|
||||||
|
version: 7
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: 16
|
||||||
- name: Cache .pnpm-store
|
cache: 'pnpm'
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.pnpm-store
|
|
||||||
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
- name: Install pnpm
|
|
||||||
run: curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@6
|
|
||||||
- run: pnpm i
|
- run: pnpm i
|
||||||
- run: pnpm build
|
- run: pnpm build
|
||||||
- run: pnpm type-check
|
- run: pnpm type-check
|
||||||
@@ -32,4 +26,4 @@ jobs:
|
|||||||
key: ${{ secrets.DIGITAL_OCEAN_SSH_KEY }}
|
key: ${{ secrets.DIGITAL_OCEAN_SSH_KEY }}
|
||||||
known_hosts: ${{ secrets.DIGITAL_OCEAN_SSH_KNOWN_HOSTS }}
|
known_hosts: ${{ secrets.DIGITAL_OCEAN_SSH_KNOWN_HOSTS }}
|
||||||
- name: Deploy to DigitalOcean
|
- name: Deploy to DigitalOcean
|
||||||
run: ssh ${{ secrets.DIGITAL_OCEAN_SSH_USERNAME }}@${{ secrets.DIGITAL_OCEAN_SSH_HOST }} "cd ~/tauri-apps-bot && git pull && rm .env; echo 'APP_ID=${{ secrets.APP_ID }}' >> .env && echo 'WEBHOOK_SECRET=${{ secrets.WEBHOOK_SECRET }}' >> .env && echo 'TAURI_BOT_ACC_TOKEN=${{ secrets.TAURI_BOT_ACC_TOKEN }}' >> .env && echo 'PORT=9000' >> .env && echo '${{ secrets.PRIVATE_KEY }}' >> tauri-apps.2021-12-31.private-key.pem && ls -lah && pnpm i && pnpm build && pm2 delete 'tauri-apps-github-bot' ; pm2 start node --time --name 'tauri-apps-github-bot' -- ./node_modules/probot/bin/probot.js run ./dist/index.js"
|
run: ssh ${{ secrets.DIGITAL_OCEAN_SSH_USERNAME }}@${{ secrets.DIGITAL_OCEAN_SSH_HOST }} "cd ~/tauri-github-bot && git pull && rm .env; echo 'APP_ID=${{ secrets.APP_ID }}' >> .env && echo 'WEBHOOK_SECRET=${{ secrets.WEBHOOK_SECRET }}' >> .env && echo 'TAURI_BOT_ACC_TOKEN=${{ secrets.TAURI_BOT_ACC_TOKEN }}' >> .env && echo 'PORT=9000' >> .env && echo '${{ secrets.PRIVATE_KEY }}' > tauri-github-bot.private-key.pem && ls -lah && pnpm i && pnpm build && pm2 delete 'tauri-github-bot' ; pm2 start node --time --name 'tauri-github-bot' -- ./node_modules/probot/bin/probot.js run ./dist/index.js"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# tauri-apps-bot
|
# tauri-github-bot
|
||||||
A bot for tauri-apps org to automate various tasks and intended to used only by tauri-apps org.
|
A GitHub bot for tauri-apps org to automate various tasks and intended to used only by tauri-apps org members.
|
||||||
|
|
||||||
## Commands:
|
## Commands:
|
||||||
> Commands are comments on issues or pull requests, that start with a special syntax.
|
> Commands are comments on issues or pull requests, that start with a special syntax.
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "tauri-apps-bot",
|
"name": "tauri-github-bot",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "A bot for tauri-apps to automate various tasks.",
|
"description": "A GitHub bot for tauri-apps org to automate various tasks and intended to used only by tauri-apps org members.",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"homepage": "https://github.com/tauri-apps/tauri-apps-bot",
|
"homepage": "https://github.com/tauri-apps/tauri-github-bot",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"probot",
|
"probot",
|
||||||
"github",
|
"github",
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { Octokit } from '@octokit/rest'
|
import { Octokit } from '@octokit/rest'
|
||||||
|
|
||||||
/** the Github App (bot) name */
|
export const TAURI_GITHUB_BOT = 'tauri-apps[bot]'
|
||||||
export const TAURI_APPS_BOT = 'tauri-apps[bot]'
|
|
||||||
/** https://github.com/tauri-bot account */
|
/** https://github.com/tauri-bot account */
|
||||||
export const TAURI_BOT_ACC = 'tauri-bot'
|
export const TAURI_BOT_ACC = 'tauri-bot'
|
||||||
export const TAURI_BOT_ACC_TOKEN = process.env.TAURI_BOT_ACC_TOKEN
|
export const TAURI_BOT_ACC_TOKEN = process.env.TAURI_BOT_ACC_TOKEN
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Octokit } from '@octokit/rest'
|
|||||||
import { Probot } from 'probot'
|
import { Probot } from 'probot'
|
||||||
import {
|
import {
|
||||||
COMMAND_REGEX,
|
COMMAND_REGEX,
|
||||||
TAURI_APPS_BOT,
|
TAURI_GITHUB_BOT,
|
||||||
TAURI_BOT_ACC,
|
TAURI_BOT_ACC,
|
||||||
TAURI_BOT_ACC_OCTOKIT,
|
TAURI_BOT_ACC_OCTOKIT,
|
||||||
TAURI_ORG,
|
TAURI_ORG,
|
||||||
@@ -71,7 +71,7 @@ export default (app: Probot): void => {
|
|||||||
// an issue is closed in a tauri-apps repo
|
// an issue is closed in a tauri-apps repo
|
||||||
repository.owner.login === TAURI_ORG &&
|
repository.owner.login === TAURI_ORG &&
|
||||||
// and was created by our bot
|
// and was created by our bot
|
||||||
(issue.user.login === TAURI_APPS_BOT ||
|
(issue.user.login === TAURI_GITHUB_BOT ||
|
||||||
// or was created by tauri-bot account
|
// or was created by tauri-bot account
|
||||||
issue.user.login === TAURI_BOT_ACC) &&
|
issue.user.login === TAURI_BOT_ACC) &&
|
||||||
// and it was from an upstream command
|
// and it was from an upstream command
|
||||||
|
|||||||
Reference in New Issue
Block a user