Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Tests

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
unittest:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- suite: shared
requirements: github_prs/requirements.txt
- suite: github_prs
requirements: github_prs/requirements.txt
- suite: zendesk_triage
requirements: zendesk_triage/requirements.txt zendesk_triage/requirements-dev.txt
- suite: deploy
requirements: github_prs/requirements.txt
- suite: crowdin
requirements: crowdin/requirements.txt
steps:
- uses: actions/checkout@v7

- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: "**/requirements*.txt"

- name: Install dependencies
run: |
for file in ${{ matrix.requirements }}; do
pip install -r "$file"
done

- name: Run ${{ matrix.suite }} tests
working-directory: ${{ matrix.suite }}
run: python -m unittest discover -v

sogs_moderation:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7

# session_util is published as a deb built against the system interpreter, so
# this suite runs on that interpreter with a venv that can see it.
- name: Install python3-session-util
run: |
sudo curl -so /usr/share/keyrings/session-foundation.gpg https://deb.session.foundation/pub.gpg
printf 'Types: deb\nURIs: https://deb.session.foundation\nSuites: %s\nComponents: main\nSigned-By: /usr/share/keyrings/session-foundation.gpg\n' \
"$(lsb_release -sc)" | sudo tee /etc/apt/sources.list.d/session.sources
sudo apt-get update
sudo apt-get install -y python3-session-util

- name: Install dependencies
run: |
python3 -m venv --system-site-packages .venv
.venv/bin/pip install -r sogs_moderation/requirements.txt

- name: Run sogs_moderation tests
working-directory: sogs_moderation
run: ../.venv/bin/python -m unittest discover -v
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ The triage's opening act: it solves the 4-5★ AppFollow reviews that were never

Deliberately narrow, because a mis-aimed bulk status change is not recoverable by re-running:

- **App-store reviews only**, by the same detection the triage uses — `triage.is_store_review`, so the two can't drift apart. Every fetched ticket is re-checked locally, since the query can't express the rating.
- **App-store reviews only**, by the same detection the triage uses — `zendesk.is_store_review`, so the two can't drift apart. Every fetched ticket is re-checked locally, since the query can't express the rating.
- **Rated 4★ or better.** A fixed floor (`MIN_STARS`), not a flag — 3★ and below are what the triage reads as bug reports in disguise, so a lower floor would have this job close the reviews most worth looking at. A review whose stars can't be parsed from the subject is skipped, never solved.
- **`new` or `open`** (`status<pending`). The "Auto Assign to Support" automation fires an hour after a review arrives and gives it a group, which moves it to `open` — so neither the status nor the assignee marks a review a human has handled, and all 628 open 4-5★ reviews share one assignee and one group. `pending` and `hold` are empty on this channel, which makes them where an agent replying to a review puts it, and the bound that keeps this job off it. There is deliberately no flag to widen this further.
- **`solved`, never `closed`.** Closed is irreversible. Solved is reversible, but only for about four days: the account's *Close ticket 4 days after status is set to solved* automation takes it from there, so a batch can be reviewed and reopened inside that window and not after it.
Expand Down
Loading
Loading