Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
7d8b758
Finish implementation of stubbed roles APIs
cyrossignol Jan 4, 2026
b1d3546
Evict user info cache entries when roles change
cyrossignol Jan 11, 2026
a6cef2a
Add missing path to skip X-Workspace check for create/delete
cyrossignol Jan 21, 2026
50abeca
Fix route path for workspace creation
cyrossignol Jan 23, 2026
4ca072d
Fix workspace creation response object
cyrossignol Jan 27, 2026
42e7345
Fix workspace input validation with proper schemas
cyrossignol Jan 29, 2026
81a4bc6
Remove dead code with incorrect response status code
cyrossignol Feb 4, 2026
bb77461
Fix missing return statement in workspace bbox
cyrossignol Feb 5, 2026
67adbff
Fix ability to create long-form quests and imagery lists
cyrossignol Feb 6, 2026
ea1645c
Remove extraneous queries
cyrossignol Feb 10, 2026
d836079
Fix response shapes for long form quests
cyrossignol Feb 12, 2026
febc60a
Fix missing quest/imagery endpoint/fields for AVIV ScoutRoute
cyrossignol Feb 13, 2026
894aa17
Fix response content of workspace update
cyrossignol Feb 16, 2026
84d0f65
Fix 500 in workspaces project group membership check
cyrossignol Feb 18, 2026
279ab67
Remove unused current_user parameter
cyrossignol Feb 21, 2026
9769c56
Fix missing validation of quest/imagery definitions
cyrossignol Feb 23, 2026
ea3a359
Switch JWKS client to singleton for cert/key caching
cyrossignol Dec 30, 2025
6e4f03e
Fix ValueError raised in project group verification
cyrossignol Dec 30, 2025
3a8cb57
Fix the blocking requests for a user's project groups
cyrossignol Jan 1, 2026
06c3bbe
Plug potential SQL injection issue
cyrossignol Dec 15, 2025
2001bef
Fix OSM proxy routing for CGImap
cyrossignol Dec 15, 2025
da0548e
Fix missing X-Workspace header in OSM proxy
cyrossignol Dec 17, 2025
6790c45
Fix improper use of HTTP 401 in OSM proxy
cyrossignol Dec 18, 2025
bc3e19a
Fix bogus regex for OSM proxy auth path whitelist
cyrossignol Dec 19, 2025
205770e
Fix resource leak/exhaustion in OSM proxy http client
cyrossignol Dec 31, 2025
d44a810
Avoid buffering entire request body in OSM proxy
cyrossignol Jan 11, 2026
07afd9a
Fix broken chunked encoding in OSM proxy by omitting HBHHs
cyrossignol Jan 12, 2026
e9b705e
Increase OSM proxy timeout for large imports
cyrossignol Jan 16, 2026
20fa521
Refuse TRACE proxy requests to avoid cross-site tracing attacks
cyrossignol Jan 25, 2026
a38e82e
Avoid compiling auth regex for every request
cyrossignol Jan 25, 2026
bc8c182
Surface OSM proxy gateway issues instead of generic 500
cyrossignol Feb 3, 2026
508bd3e
Fix OSM proxy for no-auth on capabilities.json
cyrossignol Feb 17, 2026
b92d706
Fix OSM proxy response format by forwarding all headers
cyrossignol Feb 18, 2026
57716c6
Add CORS middleware for OSM proxy
cyrossignol Feb 8, 2026
4919eaf
Fix missing validation for empty workspace updates
cyrossignol Feb 28, 2026
f692702
Fix quest definition JSON for AVIV ScoutRoute
cyrossignol Mar 1, 2026
443b697
Remove redundant regex pattern
cyrossignol Mar 1, 2026
6227337
Fix potential resource exhaustion in TDEI HTTP client
cyrossignol Mar 5, 2026
34c0423
Harden JWKS URL construction to avoid malformed endpoints
cyrossignol Mar 5, 2026
15c7436
Fix OSM proxy upstream logging with forwarding headers
cyrossignol Mar 5, 2026
7011b63
Remove now unused authorizedWorkspace variable
cyrossignol Mar 6, 2026
ca6fe12
Handle TDEI transport failures explicitly
cyrossignol Mar 7, 2026
3d0c056
Guard UUID parsing to avoid 500s on malformed tokens
cyrossignol Mar 7, 2026
e9f7e93
Merge pull request #3 from TaskarCenterAtUW/stabilize-proxy
cyrossignol Mar 7, 2026
934ce06
Small security flags and linter feedback
jeffmaki Feb 25, 2026
4961e4b
Skip migrations when running tests
jeffmaki Feb 25, 2026
3a38839
Merge pull request #2 from TaskarCenterAtUW/security-fixes
cyrossignol Mar 7, 2026
ad29762
Merge pull request #4 from TaskarCenterAtUW/roles
cyrossignol May 19, 2026
8671bc3
Tighten tenant bypass for tenantless endpoints
cyrossignol May 19, 2026
b0ff03a
Merge pull request #5 from TaskarCenterAtUW/stabilize-workspace-apis
jeffmaki May 20, 2026
877bfec
open spec
MashB May 14, 2026
806d7e6
DB schema
MashB May 18, 2026
7fa7619
updated feedback
MashB May 18, 2026
cab0cf0
spec in json format
MashB May 18, 2026
07b3284
Fix user_auth_uid type in user_role migration
cyrossignol May 20, 2026
6b4f7fd
Move OSM repo out of workspaces directory
cyrossignol May 23, 2026
e36d542
Add SQL-based augmented diff generator
cyrossignol May 23, 2026
1625f36
project, aoi, tasks, lock apis, unit & integration tests
MashB May 24, 2026
4827934
remove unwanted notes
MashB May 24, 2026
916dcfa
env setup issue
MashB May 26, 2026
b1290c0
Merge pull request #7 from TaskarCenterAtUW/fix-uid-type
cyrossignol May 26, 2026
9bb02ee
Merge pull request #6 from TaskarCenterAtUW/tighten-regex
cyrossignol May 26, 2026
fcfa8b1
AOI fix
MashB May 27, 2026
a037f91
Fix double CREATE TYPE for workspace_role enum
cyrossignol May 29, 2026
baa60cb
project roles apis
MashB Jun 1, 2026
aad663f
Merge pull request #8 from TaskarCenterAtUW/feature-tasking-mvp
MashB Jun 1, 2026
414da7a
Project roles integration
MashB Jun 2, 2026
ede4fee
project role assignment verification
MashB Jun 4, 2026
033c6b6
Merge pull request #9 from TaskarCenterAtUW/feature-tasking-manager
MashB Jun 8, 2026
d121930
audit api changes
MashB Jun 8, 2026
e3d1bff
audit test
MashB Jun 8, 2026
0966769
Fixed CI pipeline
sujata-m Jun 16, 2026
f1e2b23
Fixed isort
sujata-m Jun 16, 2026
639c1fc
Merge pull request #10 from TaskarCenterAtUW/feature-tasking-audit
MashB Jun 16, 2026
90d1def
ignore creating the extension via migration
MashB Jun 16, 2026
6047066
Merge pull request #11 from TaskarCenterAtUW/feature-ignore-extension
sujata-m Jun 17, 2026
4be81bc
Tagging workflow included
sujata-m Jun 17, 2026
a312b69
Merge pull request #12 from TaskarCenterAtUW/feature-github-pipeline
sujata-m Jun 17, 2026
e8c0902
Merge pull request #13 from TaskarCenterAtUW/fix-double-enum
cyrossignol Jun 17, 2026
bdef21a
Add auto-flagging changesets for review
cyrossignol Jun 18, 2026
2c8af48
Refactor audit event handling and update event types for tasking and …
iamrajeshk Jun 22, 2026
2c3d6a4
Refactor function signatures and import order in TaskingProjectReposi…
iamrajeshk Jun 22, 2026
b09eea1
Add current_user parameter to patch, soft_delete, activate, close, re…
iamrajeshk Jun 22, 2026
29999b2
Merge pull request #15 from TaskarCenterAtUW/feature-tasking-audit
iamrajeshk Jun 22, 2026
14994f8
Geojson file for fetching the task data
susrisha Jun 24, 2026
de31891
Update routes.py
susrisha Jun 24, 2026
7abb5a0
Linting issues fixed
susrisha Jun 24, 2026
8920979
Merge pull request #17 from TaskarCenterAtUW/feature-task-geojson
susrisha Jun 24, 2026
2cb1b8e
First pass
jeffmaki Jun 24, 2026
43741a0
Test comments and typing cleanup
jeffmaki Jun 24, 2026
fa8df69
Tests
jeffmaki Jun 24, 2026
b786099
Docs
jeffmaki Jun 24, 2026
f655772
Update ci.yml
jeffmaki Jun 24, 2026
65a9d66
isort fix
jeffmaki Jun 24, 2026
e772846
Black linter fixes
jeffmaki Jun 24, 2026
a00362b
Merge jobs
jeffmaki Jun 24, 2026
48d8eec
Update CLAUDE.md
jeffmaki Jun 25, 2026
ed9cf1e
added Route to submit Changesets for task
susrisha Jun 26, 2026
24ace55
Update test_tasks_flow.py
susrisha Jun 26, 2026
47e272c
Update repository.py
susrisha Jun 26, 2026
0d15a4e
Merge pull request #19 from TaskarCenterAtUW/feature-changeset-submit
susrisha Jun 26, 2026
b40c774
Rabbit
jeffmaki Jun 26, 2026
b77e129
Update jwt.py
jeffmaki Jun 26, 2026
ee40460
Linter setup
jeffmaki Jun 26, 2026
b810841
Update schemas.py
jeffmaki Jun 26, 2026
2c3e2df
Update ci.yml
jeffmaki Jun 26, 2026
5e4cabe
Update ci.yml
jeffmaki Jun 26, 2026
0f1d506
Update ci.yml
jeffmaki Jun 26, 2026
e0628af
Update main.py
jeffmaki Jun 26, 2026
818562a
Merge pull request #21 from TaskarCenterAtUW/develop
susrisha Jun 29, 2026
abe497e
Create push-docker-image.yml
susrisha Jul 2, 2026
5a6de5d
Merge pull request #25 from TaskarCenterAtUW/feature-docker-push
susrisha Jul 2, 2026
6f04fcb
Update repository.py
susrisha Jul 3, 2026
3e1f692
Update repository.py
susrisha Jul 3, 2026
4eefbdf
Merge pull request #26 from TaskarCenterAtUW/feature-task-3953
susrisha Jul 3, 2026
7be1a53
User gets added with contributor
susrisha Jul 3, 2026
d19d3c5
Merge pull request #27 from TaskarCenterAtUW/feature-task-3953
susrisha Jul 3, 2026
f19fcb7
Update repository.py
susrisha Jul 3, 2026
09d1ed5
Merge pull request #28 from TaskarCenterAtUW/feature-task-3953
susrisha Jul 3, 2026
2de808b
Merge pull request #18 from TaskarCenterAtUW/jeff-tests
jeffmaki Jul 7, 2026
c6600c3
Merge branch 'develop' into main
jeffmaki Jul 7, 2026
b3db3b3
Fix post-merge
jeffmaki Jul 7, 2026
6ed2726
Update conftest.py
jeffmaki Jul 7, 2026
3581848
Typing fixes
jeffmaki Jul 7, 2026
ccc2899
Merge of deploy to main
jeffmaki Jul 7, 2026
2eab87c
CI update and post-merge update to fix autoFlagReview
jeffmaki Jul 7, 2026
c2945a8
Fixes of TM tests
jeffmaki Jul 8, 2026
e42410c
Update test_audit_flow.py
jeffmaki Jul 8, 2026
1c7673c
Test cleanup
jeffmaki Jul 8, 2026
6e24d5c
Linter fixes
jeffmaki Jul 8, 2026
f346cb0
Update repository.py
jeffmaki Jul 8, 2026
9a1ca70
Update ci.yml
jeffmaki Jul 8, 2026
8c4c4ae
Fix blanket file-wide type ignores
jeffmaki Jul 8, 2026
815b9e1
Merge pull request #30 from TaskarCenterAtUW/main
susrisha Jul 8, 2026
c960f3d
Add branch index section to README
jeffmaki Jul 8, 2026
07a41a1
Merge pull request #33 from TaskarCenterAtUW/jeffmaki-patch-1
jeffmaki Jul 8, 2026
f757f06
Update README for clarity on local development setup
jeffmaki Jul 8, 2026
dd93b25
Merge pull request #34 from TaskarCenterAtUW/jeffmaki-patch-2
jeffmaki Jul 8, 2026
4f4b782
Merge branch 'develop' into staging
jeffmaki Jul 8, 2026
bc9afe3
Idempotentency
jeffmaki Jul 8, 2026
b7a11fc
Merge pull request #35 from TaskarCenterAtUW/jeff-migration-fix
jeffmaki Jul 8, 2026
e0f953e
Merge branch 'develop' into staging
jeffmaki Jul 8, 2026
3cf1e0c
Bump cryptography from 44.0.0 to 48.0.1
dependabot[bot] Jul 8, 2026
7e11f69
Bump python-multipart from 0.0.20 to 0.0.31
dependabot[bot] Jul 8, 2026
97d9d41
Update ci.yml
jeffmaki Jul 8, 2026
8b09dc0
Merge pull request #41 from TaskarCenterAtUW/jeff-ci-update
jeffmaki Jul 8, 2026
804bd70
Bump pyjwt from 2.10.1 to 2.13.0
dependabot[bot] Jul 8, 2026
614fce4
Merge pull request #38 from TaskarCenterAtUW/dependabot/uv/python-mul…
jeffmaki Jul 8, 2026
92a5014
Merge pull request #37 from TaskarCenterAtUW/dependabot/uv/cryptograp…
jeffmaki Jul 8, 2026
98d2256
Merge pull request #40 from TaskarCenterAtUW/dependabot/uv/pyjwt-2.13.0
jeffmaki Jul 8, 2026
88a63eb
Bump python-dotenv from 1.0.1 to 1.2.2
dependabot[bot] Jul 8, 2026
1d90e41
Bump urllib3 from 2.6.2 to 2.7.0
dependabot[bot] Jul 8, 2026
0c1db83
Bump mako from 1.3.8 to 1.3.12
dependabot[bot] Jul 8, 2026
3370c17
Bump idna from 3.10 to 3.15
dependabot[bot] Jul 8, 2026
64b683a
Merge pull request #45 from TaskarCenterAtUW/dependabot/uv/idna-3.15
jeffmaki Jul 8, 2026
87fcb4c
Merge pull request #44 from TaskarCenterAtUW/dependabot/uv/mako-1.3.12
jeffmaki Jul 8, 2026
0e5e4e0
Merge pull request #43 from TaskarCenterAtUW/dependabot/uv/urllib3-2.7.0
jeffmaki Jul 8, 2026
327b790
Merge pull request #42 from TaskarCenterAtUW/dependabot/uv/python-dot…
jeffmaki Jul 8, 2026
a628243
Dep updates
jeffmaki Jul 8, 2026
d7afa9d
Merge pull request #50 from TaskarCenterAtUW/jeff-dep-updates
jeffmaki Jul 8, 2026
73ba63a
Bump the uv group across 1 directory with 7 updates
dependabot[bot] Jul 8, 2026
0c0ff29
Lint fix
jeffmaki Jul 9, 2026
dda4920
Merge pull request #51 from TaskarCenterAtUW/dependabot/uv/uv-f857ecdfdb
jeffmaki Jul 9, 2026
402f5c2
Update repository.py
jeffmaki Jul 9, 2026
d1fd279
Merge pull request #52 from TaskarCenterAtUW/bbox-fix
jeffmaki Jul 9, 2026
55e9963
Merge branch 'develop' into staging
jeffmaki Jul 9, 2026
cfa643e
Defensive check on changeset resolve plus tests
jeffmaki Jul 9, 2026
a5191fe
Update routes.py
jeffmaki Jul 9, 2026
80121de
Merge pull request #54 from TaskarCenterAtUW/jeff-cs-resolve
jeffmaki Jul 9, 2026
c87a118
Deploy code feature
susrisha Jul 10, 2026
090c4bc
Update test_config.py
susrisha Jul 10, 2026
6d98fcb
Merge pull request #55 from TaskarCenterAtUW/feature-deploy-code
susrisha Jul 10, 2026
0070a2f
Enable osm-web API endpoints with auth token
jeffmaki Jul 10, 2026
83e333d
Merge pull request #57 from TaskarCenterAtUW/jeff-osm-api-auth
jeffmaki Jul 10, 2026
90f8a99
CORS config file fix
jeffmaki Jul 10, 2026
025e73b
Merge pull request #58 from TaskarCenterAtUW/jeff-cors-fix
jeffmaki Jul 10, 2026
cd4cd64
Tweak to enable OSM token bridge by default
jeffmaki Jul 10, 2026
e81363b
Merge pull request #59 from TaskarCenterAtUW/jeff-osm-api-auth
jeffmaki Jul 10, 2026
935d344
Change stub user to validate OSM rails models
jeffmaki Jul 10, 2026
2a15525
Merge pull request #60 from TaskarCenterAtUW/jeff-osm-api-auth
jeffmaki Jul 10, 2026
b56f1cd
Docs
jeffmaki Jul 10, 2026
d041797
Merge pull request #61 from TaskarCenterAtUW/jeff-docs
jeffmaki Jul 10, 2026
ecc0f4f
initial docker setup done
susrisha Jul 14, 2026
ac2700f
Added custom_imagery column
susrisha Jul 14, 2026
70b14cc
imagery and description added
susrisha Jul 14, 2026
49c11b6
Added routes for validate name
susrisha Jul 14, 2026
ed1b7f4
Update a92361f527ef_custom_imagery_and_description.py
susrisha Jul 14, 2026
1129280
updated required settings
susrisha Jul 14, 2026
5b1127e
Merge pull request #62 from TaskarCenterAtUW/feature-local-setup
susrisha Jul 14, 2026
730d488
Expand README with deployment architecture and services
jeffmaki Jul 14, 2026
d9899f9
Merge pull request #63 from TaskarCenterAtUW/jeffmaki-docs
jeffmaki Jul 14, 2026
90ddfc5
Update README.md
susrisha Jul 15, 2026
f332c1d
Merge pull request #64 from TaskarCenterAtUW/feature-local-setup
susrisha Jul 15, 2026
7b587c4
Defensive check on changeset resolve plus tests
jeffmaki Jul 9, 2026
2d9c4a6
Update routes.py
jeffmaki Jul 9, 2026
8997837
Deploy code feature
susrisha Jul 10, 2026
3d9ea37
Update test_config.py
susrisha Jul 10, 2026
e9456cd
Enable osm-web API endpoints with auth token
jeffmaki Jul 10, 2026
474f423
CORS config file fix
jeffmaki Jul 10, 2026
6a9b034
Tweak to enable OSM token bridge by default
jeffmaki Jul 10, 2026
9e607eb
Change stub user to validate OSM rails models
jeffmaki Jul 10, 2026
a7b4109
Docs
jeffmaki Jul 10, 2026
6df53b0
initial docker setup done
susrisha Jul 14, 2026
ba9cdc2
Added custom_imagery column
susrisha Jul 14, 2026
856ebb6
imagery and description added
susrisha Jul 14, 2026
dbf41e2
Added routes for validate name
susrisha Jul 14, 2026
edb1241
Update a92361f527ef_custom_imagery_and_description.py
susrisha Jul 14, 2026
31bd237
updated required settings
susrisha Jul 14, 2026
d7dc66c
Expand README with deployment architecture and services
jeffmaki Jul 14, 2026
63fab7c
Update README.md
susrisha Jul 15, 2026
2002bc4
Merge branch 'develop' of https://github.com/TaskarCenterAtUW/workspa…
susrisha Jul 16, 2026
21e6aec
Merge pull request #65 from TaskarCenterAtUW/develop
susrisha Jul 16, 2026
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
18 changes: 18 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"permissions": {
"allow": [
"Bash(grep -rln *)",
"Bash(grep -nA12 '\\\\[project.optional-dependencies\\\\]\\\\|optional-dependencies\\\\|\\\\[dependency-groups\\\\]' pyproject.toml)",
"Bash(grep -vE \"^$\")",
"Bash(git ls-tree *)",
"Bash(grep -E '\\\\.py$')",
"Bash(grep -v '\\\\.sample$')",
"Bash(git config *)",
"Bash(command -v gh)",
"Bash(gh api *)",
"Bash(python3 -c \"import sys,json; d=json.load\\(sys.stdin\\); print\\('protected:', d.get\\('protected'\\)\\); p=d.get\\('protection',{}\\); print\\('required_pull_request_reviews:', 'yes' if p.get\\('required_pull_request_reviews'\\) else 'no'\\); print\\('enforce_admins:', \\(p.get\\('enforce_admins'\\) or {}\\).get\\('enabled'\\)\\)\")",
"Bash(grep -nA6 \"TENANT_BYPASSES: list\" api/main.py)",
"Bash(grep -nA10 \"STRIP_REQUEST_HEADERS = \" api/main.py)"
]
}
}
84 changes: 22 additions & 62 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,81 +2,41 @@ name: CI

on:
push:
branches: [ main ]
branches: [ develop ]
pull_request:
branches: [ main ]
branches: [ develop ]

# Cancel any in-progress run for the same branch/PR when a newer commit lands.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v6
with:
version: "0.5.8"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install the project
run: uv sync --all-extras

- name: Check imports with isort
run: uv run isort --check-only --diff .

- name: Check code formatting with black
run: uv run black --check .
enable-cache: true

test:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.8"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install the project
run: uv sync --all-extras

- name: Run tests
run: uv run pytest tests
env:
TASK_DATABASE_URL: "postgresql+asyncpg://postgres:postgres@localhost:5432/test_db"
OSM_DATABASE_URL: "postgresql+asyncpg://postgres:postgres@localhost:5432/test_db"
JWT_SECRET: "test_secret_key"
JWT_ALGORITHM: "HS256"

services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
python-version: ${{ matrix.python-version }}

# Runs the same checks locals get from scripts/ci.sh: uv sync, isort,
# black, pyright, and pytest. `--integration` additionally runs the
# PostGIS/testcontainers suite (`pytest -m integration`); the ubuntu-latest
# runner ships a running Docker daemon, which testcontainers needs to boot
# the database. The script runs every check and exits non-zero if any fail,
# so a single red step still lists all failures.
- name: Run CI checks
run: ./scripts/ci.sh --integration
64 changes: 64 additions & 0 deletions .github/workflows/push-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Push Docker Image to Azure Container Registry

on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy to'
required: true
default: 'develop'
type: choice
options:
- develop
- staging
- production
- testing

jobs:
set-github-environment:
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.set-env.outputs.target_env }}
steps:
- name: Set Environment
id: set-env
run: |
case "${{ inputs.environment }}" in
testing) echo "target_env=test" >> $GITHUB_OUTPUT ;;
develop) echo "target_env=dev" >> $GITHUB_OUTPUT ;;
staging) echo "target_env=stage" >> $GITHUB_OUTPUT ;;
production) echo "target_env=prod" >> $GITHUB_OUTPUT ;;
esac
build:
runs-on: ubuntu-latest
name: "Build"
needs: set-github-environment
concurrency:
group: build
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.environment }}

- uses: docker/login-action@v3
with:
registry: ${{ vars.DOCKERHUB_REGISTRY }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ vars.DOCKERHUB_REGISTRY }}/workspaces-backend-v2:${{ needs.set-github-environment.outputs.environment }},
${{ vars.DOCKERHUB_REGISTRY }}/workspaces-backend-v2:${{github.sha}}

42 changes: 42 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Whenever there is a pull request merged into the branches, create tag
name: Update Environment Tag
on:
pull_request:
types: [closed]
branches:
- develop
- staging
- production
jobs:
update-tag:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Get the current branch name
id: get_branch
run: |
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"

if [ "$TARGET_BRANCH" = "develop" ]; then
echo "ENV_TAG=dev" >> $GITHUB_ENV
elif [ "$TARGET_BRANCH" = "staging" ]; then
echo "ENV_TAG=stage" >> $GITHUB_ENV
elif [ "$TARGET_BRANCH" = "production" ]; then
echo "ENV_TAG=prod" >> $GITHUB_ENV
else
echo "ENV_TAG=" >> $GITHUB_ENV
fi
- name: Force update tag
if: ${{ env.ENV_TAG != '' }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
echo "Targeting tag: ${{ env.ENV_TAG }}"
git tag -f $ENV_TAG
git push origin $ENV_TAG --force
36 changes: 36 additions & 0 deletions .github/workflows/trigger-deploy-on-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Trigger Deployment on Pull Request Merge
on:
pull_request:
types: [closed]
branches: [ develop, staging, production]
permissions:
contents: read
actions: write
jobs:
on-merge:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.set-environment.outputs.environment }}
steps:
- name: Set Environment
id: set-environment
run: |
case "${{ github.base_ref }}" in
develop) echo "environment=develop" >> $GITHUB_OUTPUT ;;
staging) echo "environment=staging" >> $GITHUB_OUTPUT ;;
production) echo "environment=production" >> $GITHUB_OUTPUT ;;
testing) echo "environment=testing" >> $GITHUB_OUTPUT ;;
esac
deploy:
needs: on-merge
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Trigger Deployment Workflow
run: |
gh workflow run push-docker-image.yml \
--repo ${{ github.repository }} \
--ref ${{ github.base_ref }} \
--field environment=${{ needs.on-merge.outputs.environment }}
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,11 @@ alembic/versions/.DS_Store
/workspaces-openstreetmap-website
pg_user_cache.sqlite

.env**
.env**
integration-report.html
docs/tasking-mvp/tasking-mvp.postman_collection.json
docs/tasking-mvp/tasking-mvp.postman_environment.json
docs/tasking-mvp/_enrich_postman.py
docs/tasking-mvp/feature-coverage.md
.idea/
data/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
name: isort (python)

- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.10.0
hooks:
- id: black
language_version: python3.12
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-python.python",
"ms-python.vscode-pylance"
]
}
13 changes: 12 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@
"alembic"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
"python.testing.pytestEnabled": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
},
"isort.args": [
"--profile",
"black"
]
}
Loading
Loading