Compare commits

..
Author SHA1 Message Date
Dustin Pianalto b1f705746e Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 21:00:43 -08:00
Dustin Pianalto 8893cc62f4 Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 20:56:51 -08:00
Dustin Pianalto 0bc5953c65 Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 14:51:04 -08:00
Dustin Pianalto 821ede69cf Test broadcast response
CI / build (push) Has been cancelled
2021-06-30 14:34:03 -08:00
Dustin Pianalto fe2e28357a Add broadcast command
CI / build (push) Has been cancelled
2021-02-24 17:18:52 -09:00
Dustin Pianalto b8ca9506c9 Add broadcast command
CI / build (push) Has been cancelled
2021-02-24 17:09:35 -09:00
Dustin Pianalto 1d8de473c4 Add broadcast command
CI / build (push) Has been cancelled
2021-02-24 16:29:42 -09:00
Dustin Pianalto 6a08f06101 Compare servernames as lower
CI / build (push) Has been cancelled
2021-02-24 14:29:32 -09:00
Dustin Pianalto dddcc8c316 Update format on listplayers output
CI / build (push) Has been cancelled
2021-02-24 14:10:55 -09:00
Dustin Pianalto 5a384305b0 Add initial listplayers
CI / build (push) Has been cancelled
2021-02-24 14:06:18 -09:00
Dustin Pianalto fb5f508fdf Add initial listplayers
CI / build (push) Has been cancelled
2021-02-24 14:01:20 -09:00
Dustin Pianalto 1fbe5ca7bf Add initial listplayers
CI / build (push) Has been cancelled
2021-02-24 13:53:43 -09:00
Dustin Pianalto 2e0762ee0f Fix permission bug in close
CI / build (push) Has been cancelled
2021-02-24 11:37:52 -09:00
Dustin Pianalto ccb450e543 Add view command and update utils
CI / build (push) Has been cancelled
2021-02-24 00:03:12 -09:00
Dustin Pianalto c34f475084 Add view command and update utils
CI / build (push) Has been cancelled
2021-02-23 23:53:28 -09:00
Dustin Pianalto 1a7d9b824f Add view command and update utils
CI / build (push) Has been cancelled
2021-02-23 23:42:02 -09:00
Dustin Pianalto 0bf31a3e5d Add view command and update utils
CI / build (push) Has been cancelled
2021-02-23 23:29:19 -09:00
Dustin Pianalto 128011c79a Add comment command
CI / build (push) Has been cancelled
2021-02-23 21:56:10 -09:00
Dustin Pianalto 53dc44abda Fix bug when updating request
CI / build (push) Has been cancelled
2021-02-23 17:28:51 -09:00
Dustin Pianalto 6262ebfeb4 Fix bug with query
CI / build (push) Has been cancelled
2021-02-23 00:38:20 -09:00
Dustin Pianalto 005dfc815f Move migrations to separate func
CI / build (push) Has been cancelled
2021-02-22 23:59:13 -09:00
Dustin Pianalto 986d16b346 Add ftp credentials to domain types
CI / build (push) Has been cancelled
2021-02-22 23:24:19 -09:00
Dustin Pianalto 83c41e2788 Add ftp credentials to db schema
CI / build (push) Has been cancelled
2021-02-22 23:10:57 -09:00
Dustin Pianalto 24aff1be72 Fix request message
CI / build (push) Has been cancelled
2021-02-22 22:19:25 -09:00
Dustin Pianalto b28beaba0c Fix request message 2021-02-22 22:18:59 -09:00
Dustin Pianalto 4f8aaff94a Fix request message 2021-02-22 22:17:18 -09:00
Dustin Pianalto a21e884bee Fix bug getting messages from db
CI / build (push) Has been cancelled
2021-02-22 22:12:07 -09:00
Dustin Pianalto faf64a8bf9 Add message to end of list with count
CI / build (push) Has been cancelled
2021-02-22 22:03:06 -09:00
Dustin Pianalto 2abe574977 Update database schema to not allow null previous_content
CI / build (push) Has been cancelled
2021-02-22 21:56:18 -09:00
Dustin Pianalto 04c32955c7 Update database schema to not allow null previous_content
CI / build (push) Has been cancelled
2021-02-22 21:29:41 -09:00
Dustin Pianalto 1f70318d26 Update database schema to not allow null previous_content
CI / build (push) Has been cancelled
2021-02-22 21:24:55 -09:00
Dustin Pianalto 47ed519376 Update database schema to not allow null previous_content
CI / build (push) Has been cancelled
2021-02-22 21:16:28 -09:00
Dustin Pianalto 22912c7367 Fix broken SQL query
CI / build (push) Has been cancelled
2021-02-22 20:13:29 -09:00
Dustin Pianalto 6b15540d4e Add close and list commands
CI / build (push) Has been cancelled
2021-02-22 19:59:39 -09:00
Dustin Pianalto e526d27f4a update actions
CI / build (push) Has been cancelled
2021-02-22 19:51:04 -09:00
Dustin Pianalto 68c06a7356 Add request close and list commands
CI / build (push) Has been cancelled
2021-02-22 19:37:38 -09:00
Dustin Pianalto c8277cce42 Merge branch 'development' of github.com:dustinpianalto/Geeksbot into development 2021-02-22 14:05:09 -09:00
Dustin Pianalto 3069e24e8d Move db and services to pkg 2021-02-22 14:04:51 -09:00
Dustin Pianalto 472f23cc2b start close command 2021-02-07 11:27:33 -09:00
Dustin Pianalto 6d920e615d Add sar commands
CI / build (push) Has been cancelled
2021-01-30 22:52:25 -09:00
Dustin Pianalto 0b8b57a884 Add sar commands
CI / build (push) Has been cancelled
2021-01-30 22:42:14 -09:00
Dustin Pianalto 9382798997 Add sar commands
CI / build (push) Has been cancelled
2021-01-30 22:31:22 -09:00
Dustin Pianalto 24448c79f5 Add sar commands
CI / build (push) Has been cancelled
2021-01-30 22:17:01 -09:00
Dustin Pianalto 71aac148e0 remove mod/admin role command
CI / build (push) Has been cancelled
2021-01-26 00:08:20 -09:00
Dustin Pianalto 132bf94332 remove mod/admin role command
CI / build (push) Has been cancelled
2021-01-25 23:53:32 -09:00
Dustin Pianalto 964be05c48 remove mod/admin role command
CI / build (push) Has been cancelled
2021-01-25 23:49:58 -09:00
Dustin Pianalto 4895294969 fix role commands
CI / build (push) Has been cancelled
2021-01-25 23:09:21 -09:00
Dustin Pianalto 9d0d1ddd56 fix role commands
CI / build (push) Has been cancelled
2021-01-25 23:04:43 -09:00
Dustin Pianalto a587a64bd9 fix role commands
CI / build (push) Has been cancelled
2021-01-25 23:01:02 -09:00
Dustin Pianalto 53276a1442 add admin role command
CI / build (push) Has been cancelled
2021-01-25 22:41:51 -09:00
Dustin Pianalto cdbeac195f add moderator role command
CI / build (push) Has been cancelled
2021-01-25 22:21:56 -09:00
Dustin Pianalto 8256b596ff add moderator role command
CI / build (push) Has been cancelled
2021-01-25 21:52:12 -09:00
Dustin Pianalto 9e1702fa4b fix create request command
CI / build (push) Has been cancelled
2021-01-25 02:31:36 -09:00
Dustin Pianalto b6f90b61c5 fix create request command
CI / build (push) Has been cancelled
2021-01-25 02:27:56 -09:00
Dustin Pianalto 764ceb79ec fix create request sql query
CI / build (push) Has been cancelled
2021-01-25 02:20:11 -09:00
Dustin Pianalto e89805bf8e fix create channel sql query
CI / build (push) Has been cancelled
2021-01-25 02:11:28 -09:00
Dustin Pianalto cb7c487b42 fix create channel sql query
CI / build (push) Has been cancelled
2021-01-25 02:05:13 -09:00
Dustin Pianalto e1ea9cab1f fix create channel sql query
CI / build (push) Has been cancelled
2021-01-25 01:59:57 -09:00
Dustin Pianalto a6dc6f5e56 fix get user sql query
CI / build (push) Has been cancelled
2021-01-25 01:52:14 -09:00
Dustin Pianalto 203d1bbf69 fix get user sql query
CI / build (push) Has been cancelled
2021-01-25 01:43:31 -09:00
Dustin Pianalto c504f7b165 fix get user sql query
CI / build (push) Has been cancelled
2021-01-25 01:38:22 -09:00
Dustin Pianalto 34564140f5 add request command
CI / build (push) Has been cancelled
2021-01-25 01:33:46 -09:00
Dustin Pianalto e3ccc56dba add request command
CI / build (push) Has been cancelled
2021-01-25 01:21:49 -09:00
Dustin Pianalto e19f987c4e add request command
CI / build (push) Has been cancelled
2021-01-24 22:57:55 -09:00
Dustin Pianalto 552664268b use custom prefixes
CI / build (push) Has been cancelled
2021-01-24 01:11:22 -09:00
Dustin Pianalto 414757188e remove duplicate prefixes
CI / build (push) Has been cancelled
2021-01-24 01:05:16 -09:00
Dustin Pianalto 888d356b67 debug removing prefix
CI / build (push) Has been cancelled
2021-01-24 00:57:00 -09:00
Dustin Pianalto c776b25899 debug removing prefix
CI / build (push) Has been cancelled
2021-01-24 00:53:04 -09:00
Dustin Pianalto 81f6e23487 Fix array in guild service
CI / build (push) Has been cancelled
2021-01-24 00:46:41 -09:00
Dustin Pianalto 6cf574b22d Add prefix commands
CI / build (push) Has been cancelled
2021-01-24 00:40:02 -09:00
Dustin Pianalto 623df1d55a Add prefix commands
CI / build (push) Has been cancelled
2021-01-24 00:26:34 -09:00
Dustin Pianalto 489d96594c Add prefix commands
CI / build (push) Has been cancelled
2021-01-24 00:24:07 -09:00
Dustin Pianalto 580eea3dfa Fix nullability of columns 2021-01-23 20:10:48 -09:00
Dustin Pianalto 7a8e7bf213 use nullable string in user
CI / build (push) Has been cancelled
2021-01-23 16:05:02 -09:00
Dustin Pianalto 96e8388562 fix bug in user database
CI / build (push) Has been cancelled
2021-01-23 15:10:04 -09:00
Dustin Pianalto 6369f37ce5 fix bug in user service
CI / build (push) Has been cancelled
2021-01-23 15:03:15 -09:00
Dustin Pianalto ab2d51c582 fix bug in user service
CI / build (push) Has been cancelled
2021-01-23 14:59:35 -09:00
Dustin Pianalto 5400d6acd9 fix bug in user service
CI / build (push) Has been cancelled
2021-01-23 14:48:59 -09:00
Dustin Pianalto 74edd574b3 fix bug in user service
CI / build (push) Has been cancelled
2021-01-23 14:46:25 -09:00
Dustin Pianalto 266cde6468 fix bug in running migrations
CI / build (push) Has been cancelled
2021-01-23 04:27:34 -09:00
Dustin Pianalto 8b646731ee change test command name
CI / build (push) Has been cancelled
2021-01-23 04:20:17 -09:00
Dustin Pianalto c54f8450b1 fix sql typo
CI / build (push) Has been cancelled
2021-01-23 04:14:29 -09:00
Dustin Pianalto 12f5b43f35 rework services and add test command
CI / build (push) Has been cancelled
2021-01-23 03:53:34 -09:00
Dustin Pianalto 9724f77c8e Initialize services 2021-01-23 03:11:12 -09:00
Dustin Pianalto 780613d7b9 initial database crud 2021-01-23 01:25:06 -09:00
Dustin Pianalto 94dcb738bc debug errors
CI / build (push) Has been cancelled
2021-01-21 00:19:52 -09:00
Dustin Pianalto 84e2bdea5e debug errors
CI / build (push) Has been cancelled
2021-01-20 23:58:25 -09:00
Dustin Pianalto 63e6212a0b debug errors
CI / build (push) Has been cancelled
2021-01-20 23:28:15 -09:00
Dustin Pianalto cbd899ff8c debug errors
CI / build (push) Has been cancelled
2021-01-20 23:22:23 -09:00
Dustin Pianalto c9ac3235db Fix syntax errors
CI / build (push) Has been cancelled
2021-01-20 23:18:30 -09:00
Dustin Pianalto 4dc9a6e846 Test adding migration files to container
CI / build (push) Has been cancelled
2021-01-20 23:04:17 -09:00
Dustin Pianalto 662db7cd9d Test adding migration files to container 2021-01-20 23:04:14 -09:00
Dustin Pianalto 57072010dc Test adding migration files to container
CI / build (push) Has been cancelled
2021-01-20 22:44:17 -09:00
Dustin Pianalto ab8db644cb Test adding migration files to container
CI / build (push) Has been cancelled
2021-01-20 22:40:15 -09:00
Dustin Pianalto 1d3a218e2d Check error when running migrations
CI / build (push) Has been cancelled
2021-01-20 22:37:04 -09:00
Dustin Pianalto 080a417eff Check error when running migrations
CI / build (push) Has been cancelled
2021-01-20 22:21:01 -09:00
Dustin Pianalto 4e1fa43e8e Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 22:13:59 -09:00
Dustin Pianalto eed0ca1865 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 22:11:22 -09:00
Dustin Pianalto 2e7b1d2531 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 22:10:39 -09:00
Dustin Pianalto cd0fb03605 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 22:08:22 -09:00
Dustin Pianalto cc8fff4e3d Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:59:24 -09:00
Dustin Pianalto 3e98bd145a Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:53:56 -09:00
Dustin Pianalto 36a3cd26ba Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:50:13 -09:00
Dustin Pianalto d3bbef1d7f Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:40:29 -09:00
Dustin Pianalto bec8f37fa5 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:37:58 -09:00
Dustin Pianalto a097deefac Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:36:43 -09:00
Dustin Pianalto 0b310e3d00 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:28:55 -09:00
Dustin Pianalto eecf4e4be8 Fix typo in workflow
CI / build (push) Has been cancelled
2021-01-20 21:10:06 -09:00
Dustin Pianalto 08a2241d6c Connect to db in main
CI / build (push) Has been cancelled
2021-01-20 21:07:23 -09:00
Dustin Pianalto fb73d50d86 Add basic database setup 2021-01-20 21:06:01 -09:00
Dustin Pianalto 2d60384002 Add domain types 2021-01-20 17:39:18 -09:00
Dustin Pianalto 9436a4385f Change token env variable
CI / build (push) Has been cancelled
2021-01-19 01:56:56 -09:00
Dustin Pianalto 3e77b98be4 change deployment name
CI / build (push) Has been cancelled
2021-01-19 01:50:40 -09:00
Dustin Pianalto 2c5d4a62aa Add missing deps
CI / build (push) Has been cancelled
2021-01-19 01:02:46 -09:00
Dustin Pianalto 5abaf88102 Add missing deps 2021-01-19 00:59:58 -09:00
Dustin Pianalto f1980e9bcb Remove missing deps 2021-01-19 00:56:21 -09:00
Dustin Pianalto e0de5433df Basic bot and kubernetes deployment 2021-01-19 00:51:30 -09:00
Dustin Pianalto 6d67134fb7 Initial structure 2020-12-17 16:43:34 -09:00
Dusty.P 8b67892946 Update and rename README.md to README 2020-12-15 23:00:56 -09:00
Dusty.P 9c7b24b9d7 Create LICENSE 2020-12-15 23:00:28 -09:00
32 changed files with 137 additions and 483 deletions
-5
View File
@@ -1,5 +0,0 @@
# Service release contract
Butler resolves this repository's protected source revision to verified immutable images. The platform updates only image references in the existing production Compose file and restarts only the already running application services. It preserves current environment, storage, routes, and provider configuration. It retains previous application images and restores them if readiness fails.
Migration and maintenance images are pinned when declared, but this release operation does not run database migrations or maintenance jobs. A release requiring a schema change needs the corresponding explicit platform migration first. No homelab image-pin commit is required for an ordinary compatible application release.
-12
View File
@@ -1,12 +0,0 @@
{
"version": 1,
"deployment": "geeksbot-release",
"environment": "production",
"images": {
"geeksbot_release_geeksbot_image": {
"name": "geeksbot",
"tag": "sha-{revision}"
}
},
"revision_variable": "geeksbot_release_revision"
}
-6
View File
@@ -1,6 +0,0 @@
.git
.github
.gitea
.env
.idea
geeksbot
-158
View File
@@ -1,158 +0,0 @@
name: Build and Push Container
on:
push:
branches:
- master
tags:
- v*
workflow_dispatch: null
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number
|| github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-and-push:
runs-on: butler-ci
env:
REGISTRY: gitea.wayfinderak.com
IMAGE_NAME: gitea.wayfinderak.com/wayfinderak/geeksbot
container:
options: --dns 172.16.30.10
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Select relevant delivery work
id: delivery
env:
DELIVERY_EVENT: ${{ github.event_name }}
DELIVERY_REF: ${{ github.ref }}
DELIVERY_SHA: ${{ github.sha }}
DELIVERY_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
run: |
cd .
bash scripts/ci-select.sh
- name: Install Go and Docker CLI if needed
if: ${{ steps.delivery.outputs.run == 'true' }}
shell: bash
run: |
set -euo pipefail
need_apt=0
need_apk=0
if ! command -v go >/dev/null 2>&1 || ! command -v docker >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
need_apt=1
elif command -v apk >/dev/null 2>&1; then
need_apk=1
else
echo "No supported package manager found" >&2
exit 1
fi
fi
if [ "$need_apt" -eq 1 ]; then
apt-get update
if ! command -v go >/dev/null 2>&1; then
apt-get install -y golang-go
fi
if ! command -v docker >/dev/null 2>&1; then
apt-get install -y docker.io curl dnsutils iputils-ping
fi
fi
if [ "$need_apk" -eq 1 ]; then
if ! command -v go >/dev/null 2>&1; then
apk add --no-cache go
fi
if ! command -v docker >/dev/null 2>&1; then
apk add --no-cache docker-cli curl bind-tools iputils
fi
fi
go version
docker version
- name: Run tests
if: ${{ steps.delivery.outputs.run == 'true' }}
run: go test ./...
- name: Log in to Gitea Container Registry
if: ${{ (steps.delivery.outputs.run == 'true') && github.event_name != 'pull_request' }}
shell: bash
run: |
set -euo pipefail
for attempt in 1 2 3; do
echo "docker login attempt $attempt"
if echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login "$REGISTRY" -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin; then
exit 0
fi
sleep 5
done
echo "docker login failed after 3 attempts" >&2
exit 1
- name: Determine image tags
if: ${{ steps.delivery.outputs.run == 'true' }}
id: meta
shell: bash
env:
REF: ${{ gitea.ref }}
REF_NAME: ${{ gitea.ref_name }}
SHA: ${{ gitea.sha }}
run: |
set -euo pipefail
tags=("$IMAGE_NAME:sha-$SHA")
if [[ "$REF" == refs/tags/* ]]; then
version="$REF_NAME"
tags+=("$IMAGE_NAME:$version")
tags+=("$IMAGE_NAME:latest")
else
branch="$REF_NAME"
branch_safe="$(echo "$branch" | tr '/_' '--')"
sha_short="$(echo "$SHA" | cut -c1-7)"
tags+=("$IMAGE_NAME:$branch_safe")
tags+=("$IMAGE_NAME:$branch_safe-$sha_short")
if [[ "$branch" == "main" || "$branch" == "master" ]]; then
tags+=("$IMAGE_NAME:latest")
fi
fi
printf 'tags<<EOF\n' >> "$GITHUB_OUTPUT"
printf '%s\n' "${tags[@]}" >> "$GITHUB_OUTPUT"
printf 'EOF\n' >> "$GITHUB_OUTPUT"
- name: Build image
if: ${{ steps.delivery.outputs.run == 'true' }}
shell: bash
run: |
set -euo pipefail
mapfile -t tags <<'EOF'
${{ steps.meta.outputs.tags }}
EOF
build_args=()
for tag in "${tags[@]}"; do
build_args+=(--tag "$tag")
done
docker build --label "org.opencontainers.image.revision=$GITHUB_SHA" "${build_args[@]}" .
- name: Push image
if: ${{ (steps.delivery.outputs.run == 'true') && github.event_name != 'pull_request' }}
shell: bash
run: |
set -euo pipefail
while IFS= read -r tag; do
[ -n "$tag" ] || continue
docker push "$tag"
done <<'EOF'
${{ steps.meta.outputs.tags }}
EOF
+48 -52
View File
@@ -1,64 +1,60 @@
name: Build and Push Container
name: CI
# Controls when the action will run. Triggers the workflow on push to master or development
# with a tag like v1.0.0 or v1.0.0-dev
on:
push:
branches:
- master
- main
tags:
- v*
workflow_dispatch:
env:
REGISTRY: gitea.wayfinderak.com
IMAGE_NAME: wayfinderak/geeksbot
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-[a-zA-Z]+
jobs:
docker:
build:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v4
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Get Version
id: get_version
uses: battila7/get-version-action@v2.0.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Prepare image tags
id: prep
shell: bash
- name: Install go-bindata and build migrations
env:
GOPATH: /home/runner/work/Geeksbot/
run: |
short_sha="${GITHUB_SHA::7}"
tags="${REGISTRY}/${IMAGE_NAME}:sha-${short_sha}"
go get -u github.com/go-bindata/go-bindata/...
/home/runner/work/Geeksbot/bin/go-bindata -pkg migrations -prefix $GITHUB_WORKSPACE/pkg/database/migrations/ -o $GITHUB_WORKSPACE/pkg/database/migrations/bindata.go $GITHUB_WORKSPACE/pkg/database/migrations/
head $GITHUB_WORKSPACE/pkg/database/migrations/bindata.go
if [[ "${GITHUB_REF_TYPE}" == "branch" && ("${GITHUB_REF_NAME}" == "master" || "${GITHUB_REF_NAME}" == "main") ]]; then
tags+=$'\n'"${REGISTRY}/${IMAGE_NAME}:latest"
fi
- name: Build container image
env:
IMAGE_TAG: ${{ steps.get_version.outputs.version-without-v }}
run: docker build -t registry.digitalocean.com/djpianalto/geeksbot:$IMAGE_TAG .
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
version="${GITHUB_REF_NAME#v}"
tags+=$'\n'"${REGISTRY}/${IMAGE_NAME}:${version}"
fi
{
echo 'tags<<EOF'
echo "$tags"
echo 'EOF'
} >> "$GITHUB_OUTPUT"
- name: Build and push image
uses: docker/build-push-action@v6
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.prep.outputs.tags }}
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Login to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 600
- name: Push image to DigitalOcean Container Registry
run: docker push registry.digitalocean.com/djpianalto/geeksbot:$IMAGE_TAG
env:
IMAGE_TAG: ${{ steps.get_version.outputs.version-without-v }}
- name: Update deployment file
run: TAG=${{ steps.get_version.outputs.version-without-v }} && sed -i 's|<IMAGE>|registry.digitalocean.com/djpianalto/geeksbot:'${TAG}'|' $GITHUB_WORKSPACE/deployment.yml
- name: Save DigitalOcean kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 discord-bots
- name: Deploy to DigitalOcean Kubernetes
run: kubectl apply -f $GITHUB_WORKSPACE/deployment.yml
- name: Verify deployment
run: kubectl rollout status deployment/geeksbot
-2
View File
@@ -1,4 +1,2 @@
.env
.idea
portainer-app.env
+14 -10
View File
@@ -1,18 +1,22 @@
FROM golang:1.22-alpine AS builder
FROM golang:1.14-alpine as dev
WORKDIR /src
RUN apk add --no-cache ca-certificates git tzdata
WORKDIR /go/src/Geeksbot
COPY ./go.mod .
COPY ./go.sum .
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG TARGETARCH=amd64
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -o /out/geeksbot ./cmd/geeksbot
RUN go install github.com/dustinpianalto/geeksbot/...
RUN go get -u github.com/go-bindata/go-bindata/...
FROM alpine:3.20
RUN apk add --no-cache ca-certificates tzdata
CMD [ "go", "run", "cmd/geeksbot/main.go"]
COPY --from=builder /out/geeksbot /usr/local/bin/geeksbot
from alpine
ENTRYPOINT ["/usr/local/bin/geeksbot"]
WORKDIR /bin
COPY --from=dev /go/bin/geeksbot ./geeksbot
COPY --from=dev /go/bin/go-bindata ./go-bindata
CMD [ "geeksbot" ]
-26
View File
@@ -1,26 +0,0 @@
# Portainer deployment notes
Generated from the current Kubernetes deployment in namespace `discord-bots`. Secret values are in the local `portainer-*.env` files.
## Kubernetes source
- Deployment: `geeksbot`
- Replicas: `1`
- Rolling update: maxSurge `1`, maxUnavailable `1`
- minReadySeconds: `120`
- Labels/selectors: `app=geeksbot`
- Image pull secrets: `none required for Portainer stack`
## Containers
- `pgbouncer`: image `timoha/pgbouncer:1.15.0`; env: DATABASE_URL, SERVER_TLS_SSLMODE, AUTH_TYPE; ports: 5432; requests: {'cpu': '500m', 'memory': '256Mi'}; limits: {'cpu': '1', 'memory': '512Mi'}
- `geeksbot`: image `gitea.wayfinderak.com/wayfinderak/geeksbot:latest`; env: DATABASE_URL, DISCORD_TOKEN; ports: none; requests: {'cpu': '1', 'memory': '512Mi'}; limits: {'cpu': '2', 'memory': '1Gi'}
## Portainer files
- `portainer-stack.yml` - Docker Compose stack to paste/use in Portainer.
- `portainer-app.env` - bot runtime secrets/env.
## Portainer database connection
This Portainer stack does not include pgbouncer. `DATABASE_URL` in `portainer-app.env` points directly at the external PostgreSQL service copied from the Kubernetes pgbouncer upstream URL.
+5 -7
View File
@@ -6,11 +6,11 @@ import (
"os/signal"
"syscall"
"github.com/dustinpianalto/discordgo"
"github.com/bwmarrin/discordgo"
"github.com/dustinpianalto/disgoman"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/exts"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/database"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
"github.com/dustinpianalto/geeksbot/internal/exts"
"github.com/dustinpianalto/geeksbot/pkg/database"
"github.com/dustinpianalto/geeksbot/pkg/services"
)
func main() {
@@ -22,15 +22,13 @@ func main() {
}
dg.State.MaxMessageCount = 100
dg.StateEnabled = true
dg.LogLevel = 3
dg.Debug = false
dg.Identify = discordgo.Identify{
Intents: discordgo.MakeIntent(discordgo.IntentsAll),
}
database.ConnectDatabase(os.Getenv("DATABASE_URL"))
//database.RunMigrations()
database.RunMigrations()
services.InitializeServices()
owners := []string{
+1 -37
View File
@@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: geeksbot
namespace: discord-bots
namespace: default
labels:
app: geeksbot
spec:
@@ -21,42 +21,8 @@ spec:
app: geeksbot
spec:
containers:
- name: pgbouncer
image: timoha/pgbouncer:1.15.0
resources:
requests:
memory: "256Mi"
cpu: "0.5"
limits:
memory: "512Mi"
cpu: "1"
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: geeksbot
key: pgbouncer_url
- name: SERVER_TLS_SSLMODE
valueFrom:
secretKeyRef:
name: geeksbot
key: pgbouncer_ssl
- name: AUTH_TYPE
valueFrom:
secretKeyRef:
name: geeksbot
key: pgbouncer_auth
ports:
- containerPort: 5432
- name: geeksbot
image: <IMAGE>
resources:
requests:
memory: "512Mi"
cpu: "1"
limits:
memory: "1Gi"
cpu: "2"
env:
- name: DATABASE_URL
valueFrom:
@@ -68,5 +34,3 @@ spec:
secretKeyRef:
name: geeksbot
key: discord_token
imagePullSecrets:
- name: registry-1
-8
View File
@@ -1,8 +0,0 @@
services:
geeksbot:
image: ${IMAGE:-gitea.wayfinderak.com/wayfinderak/geeksbot:${IMAGE_TAG:-latest}}
container_name: geeksbot
restart: unless-stopped
environment:
DATABASE_URL: ${DATABASE_URL}
DISCORD_TOKEN: ${DISCORD_TOKEN}
+5 -4
View File
@@ -1,11 +1,12 @@
module gitea.wayfinderak.com/wayfinderak/geeksbot
module github.com/dustinpianalto/geeksbot
go 1.14
require (
github.com/bwmarrin/discordgo v0.29.0 // indirect
github.com/dustinpianalto/discordgo v0.0.4
github.com/dustinpianalto/disgoman v0.0.26
github.com/bwmarrin/discordgo v0.22.1
github.com/dustinpianalto/disgoman v0.0.15
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
github.com/golang-migrate/migrate v3.5.4+incompatible // indirect
github.com/golang-migrate/migrate/v4 v4.14.1
github.com/gorcon/rcon v1.3.1
github.com/hashicorp/errwrap v1.1.0 // indirect
+17 -48
View File
@@ -33,22 +33,19 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/AlekSi/pointer v1.0.0 h1:KWCWzsvFxNLcmM5XmiqHsGTTsuwZMsLFwWF9Y+//bNE=
github.com/AlekSi/pointer v1.0.0/go.mod h1:1kjywbfcPFCmncIxtk6fIEub6LKrfMz3gc5QKVOSOA8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/ClickHouse/clickhouse-go v1.3.12/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
github.com/apache/arrow/go/arrow v0.0.0-20200601151325-b2287a20f230/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0=
github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/bwmarrin/discordgo v0.29.0 h1:FmWeXFaKUwrcL3Cx65c20bTRW+vOb6k8AnaP+EgjDno=
github.com/bwmarrin/discordgo v0.29.0/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY=
github.com/bwmarrin/discordgo v0.20.2/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q=
github.com/bwmarrin/discordgo v0.22.1 h1:254fNYyfqJWKbPzO5g8j/nUvRgj4dNlI19EB8rnkpt8=
github.com/bwmarrin/discordgo v0.22.1/go.mod h1:c1WtWUGN6nREDmzIpyTp/iD3VYt4Fpx+bVyfBG7JE+M=
github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
@@ -60,31 +57,22 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/cockroachdb/cockroach-go v0.0.0-20190925194419-606b3d062051/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk=
github.com/containerd/containerd v1.4.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.4.1 h1:pASeJT3R3YyVn+94qEPk0SnU1OQ20Jd/T+SPKy9xehY=
github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/denisenkom/go-mssqldb v0.0.0-20200620013148-b91950f658ec/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dhui/dktest v0.3.3 h1:DBuH/9GFaWbDRa42qsut/hbQu+srAQ0rPWnUoiGX7CA=
github.com/dhui/dktest v0.3.3/go.mod h1:EML9sP4sqJELHn4jV7B0TY8oF6077nk83/tz7M56jcQ=
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible h1:iWPIG7pWIsCwT6ZtHnTUpoVMnete7O/pzd9HFE3+tn8=
github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/dustinpianalto/discordgo v0.0.4 h1:KlIkMzDH4jKRbs5IxeqeIXtNTDVcDi/sHV1gaKYEnPg=
github.com/dustinpianalto/discordgo v0.0.4/go.mod h1:LKY7UDCPJMChgrowLagHjDSj1gWbt3Hx+6bRFjpaVg8=
github.com/dustinpianalto/disgoman v0.0.26 h1:7p6hDbNgEehUgOHigY/lHDY4P2VklJiZmOn674ka1h0=
github.com/dustinpianalto/disgoman v0.0.26/go.mod h1:WsDb+7XIm2MJ6xhxRAiXlzSPuSYIGSr4rWRmACeoing=
github.com/dustinpianalto/disgoman v0.0.15 h1:kdIw6jhC82WBut7+4BarqxBw06dozU+Hu47LQzkkoGM=
github.com/dustinpianalto/disgoman v0.0.15/go.mod h1:v3FM6n+4dH9XlvO+IDx6MN3DUnGq6YVDBvy1A1k202g=
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@@ -92,6 +80,9 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw=
github.com/go-bindata/go-bindata v1.0.0 h1:DZ34txDXWn1DyWa+vQf7V9ANc2ILTtrEjtlsdJRF26M=
github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE=
github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -100,8 +91,10 @@ github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0=
github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/golang-migrate/migrate v1.3.2 h1:QAlFV1QF9zdkzy/jujlBVkVu+L/+k18cg8tuY1/4JDY=
github.com/golang-migrate/migrate v3.5.4+incompatible h1:R7OzwvCJTCgwapPCiX6DyBiu2czIUMDCB118gFTKTUA=
github.com/golang-migrate/migrate v3.5.4+incompatible/go.mod h1:IsVUlFN5puWOmXrqjgGUfIRIbU7mr8oNBE2tyERd9Wk=
github.com/golang-migrate/migrate/v4 v4.14.1 h1:qmRd/rNGjM1r3Ve5gHd5ZplytrD02UcItYNxJ3iUHHE=
github.com/golang-migrate/migrate/v4 v4.14.1/go.mod h1:l7Ks0Au6fYHuUIxUhQ0rcVX1uLlJg54C/VvW7tvxSz0=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
@@ -130,7 +123,6 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -143,7 +135,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
@@ -167,11 +158,11 @@ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51
github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc=
github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@@ -218,11 +209,9 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/ktrysmt/go-bitbucket v0.6.4/go.mod h1:9u0v3hsd2rqCHRIpbir1oP7F58uo5dq19sBYvuMoyQ4=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
@@ -239,7 +228,6 @@ github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mutecomm/go-sqlcipher/v4 v4.4.0/go.mod h1:PyN04SaWalavxRGH9E8ZftG6Ju7rsPrGmQRjrEaVpiY=
github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA=
@@ -248,16 +236,12 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
@@ -270,7 +254,6 @@ github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9Nz
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/snowflakedb/glog v0.0.0-20180824191149-f5055e6f21ce/go.mod h1:EB/w24pR5VKI60ecFnKqXzxX3dOorz1rnVicQTQrGM0=
github.com/snowflakedb/gosnowflake v1.3.5/go.mod h1:13Ky+lxzIm3VqNDZJdyvu9MCGy+WgRdYFdXp96UcLZU=
@@ -281,7 +264,6 @@ github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs=
@@ -303,6 +285,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16 h1:y6ce7gCWtnH+m3dCjzQ1PCuwl28DDIc3VNnvY29DlIA=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
@@ -312,9 +296,8 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg=
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b h1:7mWr3k41Qtv8XlltBkDkl8LoP3mpSgBW8BUoxtEdbXg=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -378,8 +361,6 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201029221708-28c70e62bb1d/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -433,19 +414,14 @@ golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201029080932-201ba4db2418/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s=
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -498,7 +474,6 @@ golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
@@ -555,7 +530,6 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200815001618-f69a88009b70/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200911024640-645f7a48b24f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201030142918-24207fddd1c3 h1:sg8vLDNIxFPHTchfhH1E3AI32BL3f23oie38xUWnJM8=
google.golang.org/genproto v0.0.0-20201030142918-24207fddd1c3/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
@@ -570,7 +544,6 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.1 h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc=
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
@@ -581,10 +554,8 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
@@ -594,9 +565,7 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+2 -2
View File
@@ -2,8 +2,8 @@ package discord_utils
import (
"github.com/dustinpianalto/disgoman"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/pkg/services"
)
func IsGuildMod(ctx disgoman.Context, user geeksbot.User) bool {
+5 -5
View File
@@ -6,9 +6,9 @@ import (
"strings"
"github.com/dustinpianalto/disgoman"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/discord_utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/internal/discord_utils"
"github.com/dustinpianalto/geeksbot/pkg/services"
"github.com/gorcon/rcon"
)
@@ -171,8 +171,8 @@ func broadcast(ctx disgoman.Context, server geeksbot.Server, message string) {
)
return
}
log.Printf("%T - %#v", response, response)
if strings.Contains(response, "Server received, But no response!!") {
log.Printf("%#v", response)
if response == "Server recieved, But no response!! \n " {
_, _ = ctx.Session.ChannelMessageEdit(ctx.Channel.ID, msg.ID,
fmt.Sprintf("**%s Broadcast Successful**", server.Name),
)
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"fmt"
"github.com/dustinpianalto/disgoman"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/discord_utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/internal/discord_utils"
"github.com/dustinpianalto/geeksbot/internal/utils"
"github.com/dustinpianalto/geeksbot/pkg/services"
)
var AddPrefixCommand = &disgoman.Command{
+5 -5
View File
@@ -5,12 +5,12 @@ import (
"strconv"
"strings"
"github.com/dustinpianalto/discordgo"
"github.com/bwmarrin/discordgo"
"github.com/dustinpianalto/disgoman"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/discord_utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/internal/discord_utils"
"github.com/dustinpianalto/geeksbot/internal/utils"
"github.com/dustinpianalto/geeksbot/pkg/services"
)
var AddModeratorRoleCommand = &disgoman.Command{
+4 -4
View File
@@ -2,10 +2,10 @@ package exts
import (
"github.com/dustinpianalto/disgoman"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/exts/arcon"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/exts/guild"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/exts/requests"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/exts/utils"
"github.com/dustinpianalto/geeksbot/internal/exts/arcon"
"github.com/dustinpianalto/geeksbot/internal/exts/guild"
"github.com/dustinpianalto/geeksbot/internal/exts/requests"
"github.com/dustinpianalto/geeksbot/internal/exts/utils"
)
func AddCommandHandlers(g *disgoman.CommandManager) {
+4 -4
View File
@@ -8,10 +8,10 @@ import (
"time"
"github.com/dustinpianalto/disgoman"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/discord_utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/internal/discord_utils"
"github.com/dustinpianalto/geeksbot/internal/utils"
"github.com/dustinpianalto/geeksbot/pkg/services"
)
var RequestCommand = &disgoman.Command{
+8 -7
View File
@@ -7,11 +7,11 @@ import (
"strings"
"time"
"github.com/dustinpianalto/discordgo"
"github.com/bwmarrin/discordgo"
"github.com/dustinpianalto/disgoman"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/discord_utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/internal/discord_utils"
"github.com/dustinpianalto/geeksbot/pkg/services"
)
var PingCommand = &disgoman.Command{
@@ -110,9 +110,9 @@ var GitCommand = &disgoman.Command{
func gitCommandFunc(ctx disgoman.Context, _ []string) {
embed := &discordgo.MessageEmbed{
Title: "Hi there, my code is on Gitea",
Title: "Hi there, My code is on Github",
Color: 0,
URL: "https://gitea.wayfinderak.com/wayfinderak/geeksbot",
URL: "https://github.com/dustinpianalto/Geeksbot",
}
_, err := ctx.Session.ChannelMessageSendEmbed(ctx.Channel.ID, embed)
if err != nil {
@@ -213,9 +213,10 @@ func userCommandFunc(ctx disgoman.Context, args []string) {
Inline: false,
}
guildJoinTime, _ := member.JoinedAt.Parse()
guildJoinedField := &discordgo.MessageEmbedField{
Name: "Joined Guild:",
Value: discord_utils.ParseDateString(member.JoinedAt),
Value: discord_utils.ParseDateString(guildJoinTime),
Inline: false,
}
+1 -4
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"github.com/dustinpianalto/geeksbot"
)
type channelService struct {
@@ -50,9 +50,6 @@ func (s channelService) GuildChannels(g geeksbot.Guild) ([]geeksbot.Channel, err
var channels []geeksbot.Channel
queryString := "SELECT id FROM channels WHERE guild_id = $1"
rows, err := s.db.Query(queryString, g.ID)
if err != nil {
return channels, err
}
for rows.Next() {
var id string
err = rows.Scan(&id)
+5 -13
View File
@@ -4,9 +4,8 @@ import (
"database/sql"
"fmt"
"log"
"time"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/database/migrations"
"github.com/dustinpianalto/geeksbot/pkg/database/migrations"
"github.com/golang-migrate/migrate/v4"
"github.com/golang-migrate/migrate/v4/database/postgres"
bindata "github.com/golang-migrate/migrate/v4/source/go_bindata"
@@ -27,19 +26,12 @@ func ConnectDatabase(dbConnString string) {
var err error
db, err = sql.Open("postgres", dbConnString)
if err != nil {
log.Fatal(fmt.Errorf("can't connect to the database: %w", err))
log.Fatal(fmt.Errorf("Can't connect to the database: %w", err))
}
db.SetMaxOpenConns(5)
db.SetMaxIdleConns(2)
db.SetConnMaxLifetime(30 * time.Minute)
db.SetConnMaxIdleTime(5 * time.Minute)
if err = db.Ping(); err != nil {
log.Fatal(fmt.Errorf("can't ping the database: %w", err))
}
log.Println("Database Connected.")
db.SetMaxOpenConns(75)
db.SetMaxIdleConns(5)
db.SetConnMaxLifetime(300)
initServices()
log.Println("Services Initialized")
}
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"github.com/dustinpianalto/geeksbot"
"github.com/lib/pq"
)
+2 -2
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"github.com/dustinpianalto/geeksbot"
"github.com/lib/pq"
)
@@ -61,7 +61,7 @@ func (s messageService) UpdateMessage(m geeksbot.Message) (geeksbot.Message, err
queryString = "UPDATE messages SET modified_at = $2, content = $3, previous_content = $4 WHERE id = $1"
_, err = s.db.Exec(queryString, m.ID, m.ModifiedAt, m.Content, previousContent)
m.PreviousContent = previousContent
return m, err
return m, nil
}
func (s messageService) DeleteMessage(m geeksbot.Message) error {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"github.com/dustinpianalto/geeksbot"
)
type patreonService struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"github.com/dustinpianalto/geeksbot"
)
type requestService struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"github.com/dustinpianalto/geeksbot"
)
type serverService struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package database
import (
"database/sql"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"github.com/dustinpianalto/geeksbot"
)
type userService struct {
+2 -2
View File
@@ -1,8 +1,8 @@
package services
import (
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/database"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/pkg/database"
)
var (
-3
View File
@@ -1,3 +0,0 @@
DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/geeksbot?sslmode=disable
DISCORD_TOKEN=replace-me
STEAM_API_KEY=replace-me
-9
View File
@@ -1,9 +0,0 @@
services:
geeksbot:
image: gitea.wayfinderak.com/wayfinderak/geeksbot:latest
container_name: geeksbot
restart: unless-stopped
env_file:
- ./portainer-app.env
mem_limit: 1g
cpus: "2.0"
-39
View File
@@ -1,39 +0,0 @@
#!/usr/bin/env bash
# Keep required jobs alive; only skip reviewed non-runtime documentation paths.
set -euo pipefail
base="${DELIVERY_BASE:-}"
head="$(git rev-parse HEAD)"
run=true
if [[ "${DELIVERY_REF:-}" != refs/tags/* && "$head" == "${DELIVERY_SHA:-}" && "${DELIVERY_EVENT:-}" =~ ^(push|pull_request)$ && "$base" =~ ^[0-9a-f]{40}$ && "$base" != 0000000000000000000000000000000000000000 ]]; then
if ! git cat-file -e "$base^{commit}" 2>/dev/null; then
if [[ -n "${DELIVERY_FETCH_TOKEN:-}" ]]; then
git -c "http.extraHeader=Authorization: token ${DELIVERY_FETCH_TOKEN}" fetch --quiet --depth=1 origin "$base" >/dev/null 2>&1 || true
else
git fetch --quiet --depth=1 origin "$base" >/dev/null 2>&1 || true
fi
fi
if git cat-file -e "$base^{commit}" 2>/dev/null; then
paths="$(mktemp)"
trap 'rm -f -- "$paths"' EXIT
# Snapshot comparison is conservative when main advanced during a PR.
# Both rename sides remain visible, including names containing newlines.
if git diff --no-renames --name-only -z "$base" "$head" > "$paths"; then
run=false
while IFS= read -r -d '' path; do
case "$path" in
README.md|CHANGELOG.md|LICENSE|LICENSE.md) ;;
*) run=true; break ;;
esac
done < "$paths"
fi
fi
fi
if [[ "$run" == false ]]; then
echo 'Only reviewed non-runtime documentation changed; build and validation are not applicable.'
else
echo 'Runtime, unknown inputs, or unavailable event history: run required validation.'
fi
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
echo "run=$run" >> "$GITHUB_OUTPUT"
fi
printf '%s\n' "$run"