Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
68316a1
Separate `Progress` column into `Percent mapped` & `Percent validated`
royallsilwallz May 29, 2025
b8c6d3d
Separate `Project Status` into a different filter in Explore Projects
royallsilwallz May 29, 2025
850d606
Fixes to Explore Projects filter
royallsilwallz Jun 10, 2025
280dff7
refactor: initial cleanup for circleci -> GHActions
nischalstha9 Jun 11, 2025
f718a41
refactor: remove CircleCI Workflows
nischalstha9 Jun 16, 2025
74ee8f6
Allow organization admins to view `DRAFT` projects
royallsilwallz Jun 16, 2025
eaacc2d
Adjust test cases for ProjectActionFilter changes
royallsilwallz Jun 17, 2025
d68df13
Reduce sample rate for sentry replays
dakotabenjamin Jun 20, 2025
3cf42a9
Merge pull request #6910 from hotosm/infra/remove-sentry-relays
ramyaragupathy Jun 23, 2025
0cedac5
Merge pull request #6901 from hotosm/enhancement/6807-explore-project…
ramyaragupathy Jun 24, 2025
bb3e100
Merge pull request #6890 from hotosm/circleci-to-ghActions
dakotabenjamin Jun 26, 2025
80e5d49
Managers bulk mention in project chat to include organisation manager…
prabinoid Jun 27, 2025
a3aae80
Merge pull request #6914 from hotosm/fix/managers-mention
nischalstha9 Jun 27, 2025
85e1149
Fix test cases failure on CI
royallsilwallz Jul 1, 2025
9e0bbf0
Merge pull request #6921 from hotosm/fix/test-case-failure-on-ci
dakotabenjamin Jul 1, 2025
96f9920
Fix language option missing from user settings page issue
royallsilwallz Jun 23, 2025
8516364
Fix crash issue due to language not found error
royallsilwallz Jun 27, 2025
38df46c
Adjust test cases for Header language dropdown
royallsilwallz Jul 2, 2025
af3da09
Merge pull request #6918 from hotosm/fix/6908-language-option-missing…
ramyaragupathy Jul 2, 2025
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
510 changes: 0 additions & 510 deletions .circleci/config.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .circleci/rdsid.sh

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/add-version-to-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ jobs:
add_release:
runs-on: ubuntu-latest
steps:
- name: Add release version to db
run: |
curl -X POST "https://tasking-manager-tm4-production-api.hotosm.org/api/v2/system/release/"
- name: Add release version to db
run: |
curl -X POST "https://tasking-manager-production-api.hotosm.org/api/v2/system/release/"
50 changes: 5 additions & 45 deletions .github/workflows/backend-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,51 +26,11 @@ env:

jobs:
image-build-and-push:
name: Build Container Images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
outputs:
image_tags: ${{ steps.meta.outputs.tags }}

steps:
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set container image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ github.ref_name }}
type=raw,value=${{ github.sha }}

- name: Build and push container image
id: build-push-image
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}"
target: prod
platforms: linux/amd64,linux/arm64
file: scripts/docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: |
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ github.ref_name }}
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-main
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-staging
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-develop
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ github.ref_name }},mode=max
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
with:
image_name: ghcr.io/${{ github.repository }}/backend
build_target: prod
dockerfile: scripts/docker/Dockerfile

deploy-service:
name: Deploy ${{ matrix.service }} to ECS
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/backend-build.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/pr_test_backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: πŸ§ͺ PR Test Backend

on:
pull_request:
branches:
- main
- staging
- develop
paths:
- "backend/**"
workflow_dispatch:

jobs:
code-check-PEP8:
name: Run PEP8 code style checks
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install black==25.1.0

- name: Run PEP8 checks
run: |
flake8 manage.py backend tests migrations
black --check manage.py backend tests migrations

pytest:
uses: hotosm/gh-workflows/.github/workflows/test_compose.yml@3.2.0
with:
image_name: ghcr.io/${{ github.repository }}/backend
build_context: .
build_dockerfile: ./scripts/docker/Dockerfile
pre_command: |
cp example.env tasking-manager.env
docker compose up -d tm-db tm-backend tm-migration tm-cron-jobs traefik
docker compose exec tm-db bash -c "PGPASSWORD=tm psql -U tm -d tasking-manager <<EOF
CREATE DATABASE taskingmanagertest;
EOF"
compose_file: "docker-compose.yml"
compose_service: tm-backend
compose_command: pytest tests/api/unit/ -p no:warnings
cache_extra_imgs: |
"postgis/postgis:14-3.3"
secrets: inherit
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
name: Build & publish TM frontend static files
name: πŸ§ͺ PR Test Frontend

on:
push:
branches:
- deployment/hot-tasking-manager
- deployment/demo-tasking-manager
- deployment/container-tasking-manager

pull_request:
branches:
- main
- staging
- develop
- deployment/hot-tasking-manager
- deployment/demo-tasking-manager
- deployment/container-tasking-manager
paths:
- "frontend/**"
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -62,6 +56,10 @@ jobs:
working-directory: ./frontend
run: yarn install

- name: Run Yarn test
working-directory: ./frontend
run: yarn test

- name: Generate build
working-directory: ./frontend
run: |
Expand Down
19 changes: 17 additions & 2 deletions backend/services/messaging/message_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,14 +774,29 @@ async def _parse_message_for_bulk_mentions(
)
usernames.extend([member["username"] for member in team_members])

organisation_managers_query = """
SELECT DISTINCT u.username
FROM projects p
JOIN organisation_managers om ON p.organisation_id = om.organisation_id
JOIN users u ON u.id = om.user_id
WHERE p.id = :project_id
"""

organisation_managers = await db.fetch_all(
organisation_managers_query, values={"project_id": project_id}
)
if organisation_managers:
usernames.extend(
[manager["username"] for manager in organisation_managers]
)

# Add contributors if task_id is provided and contributors are mentioned
if task_id and "contributors" in parsed:
contributors = await Message.get_all_tasks_contributors(
project_id, task_id, db
)
usernames.extend(contributors)

return usernames
return list(set(usernames))

@staticmethod
async def _parse_message_for_username(
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/components/header/tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,18 @@ describe('Right side action items', () => {
expect(screen.getByLabelText('Sample avatar')).toBeInTheDocument();
});

test("when the user isn't logged in", () => {
test("when the user isn't logged in", async () => {
act(() => {
store.dispatch({
type: 'SET_USER_DETAILS',
userDetails: {},
});
});
setup();
expect(screen.getByRole('combobox')).toBeInTheDocument();
expect(screen.getByText('English')).toBeInTheDocument();
await waitFor(() => {
expect(screen.getByRole('combobox')).toBeInTheDocument();
expect(screen.getByText('English')).toBeInTheDocument();
});
expect(
screen.getByRole('button', {
name: /log in/i,
Expand Down
29 changes: 20 additions & 9 deletions frontend/src/components/localeSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FormattedMessage } from 'react-intl';
import Select from 'react-select';

import messages from './messages';
import { supportedLocales } from '../utils/internationalization';
import { useFetch } from '../hooks/UseFetch';
import { setLocale } from '../store/actions/userPreferences';

function LocaleSelect({
Expand All @@ -13,22 +13,30 @@ function LocaleSelect({
removeBorder = true,
fullWidth = false,
}) {
const [errorLanguages, loadingLanguages, languages] = useFetch('system/languages/');

const supportedLanguages =
!errorLanguages && !loadingLanguages ? languages.supportedLanguages : [];

const onLocaleSelect = (arr) => {
setLocale(arr[0].value);
setLocale(arr[0].code);
};

const getActiveLanguageNames = () => {
const locales = [userPreferences.locale, navigator.language, navigator.language.substr(0, 2)];
let supportedLocaleNames = [];
locales.forEach((locale) =>
supportedLocales
.filter((i) => i.value === locale)
supportedLanguages
.filter((i) => i.code === locale)
.forEach((i) => supportedLocaleNames.push(i)),
);

return supportedLocaleNames.length ? supportedLocaleNames[0].value : 'en';
return supportedLocaleNames.length ? supportedLocaleNames[0].code : 'en';
};

// wait till supportedLanguages are fetched
if (!supportedLanguages.length) return <></>;

return (
<div className={`settings-width ml-auto ${className || ''}`}>
<Select
Expand All @@ -37,19 +45,22 @@ function LocaleSelect({
control: (baseStyles, state) => ({
...baseStyles,
border: removeBorder ? 'none' : 'auto',
width: fullWidth ? '100%' : `${8 * state.getValue()[0].label.length + 60}px`,
width:
fullWidth || !supportedLanguages.length
? '100%'
: `${8 * state.getValue()[0].language.length + 60}px`,
marginLeft: 'auto',
}),
menu: (baseStyles) => ({
...baseStyles,
zIndex: 6,
}),
}}
getOptionLabel={({ label }) => label}
getOptionLabel={({ language }) => language}
onChange={(e) => onLocaleSelect([e])}
options={supportedLocales}
options={supportedLanguages}
placeholder={<FormattedMessage {...messages.language} />}
value={supportedLocales.find((editor) => editor.value === getActiveLanguageNames())}
value={supportedLanguages.find((editor) => editor.code === getActiveLanguageNames())}
/>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/projects/clearFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { FormattedMessage } from 'react-intl';

import messages from './messages';

export default function ClearFilters({ url, className = '' }: Object) {
export default function ClearFilters({ url, className = '', onClick }: Object) {
return (
<Link to={url} className={`red link ph3 pv2 f6 ${className}`}>
<Link to={url} className={`red link ph3 pv2 f6 ${className}`} onClick={onClick}>
<FormattedMessage {...messages.clearFilters} />
</Link>
);
Expand Down
Loading
Loading