Skip to content

Commit

Permalink
Do not wrongly include "Nothing" as a query param to dependents listi…
Browse files Browse the repository at this point in the history
…ng (#817)

* Do not wrongly include "Nothing" as a query param to dependents listing

* Add changleog

* Update CI setup
  • Loading branch information
tchoutri authored Jan 12, 2025
1 parent d071deb commit 70b38d9
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
jobs:
generateMatrix:
name: "Generate matrix from cabal"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
Expand All @@ -21,7 +21,7 @@ jobs:
uses: kleidukos/get-tested@v0.1.7.1
with:
cabal-file: flora.cabal
ubuntu-version: "latest"
ubuntu-version: "22.04"
version: 0.1.7.1

Backend_tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- synchronize
jobs:
lint-changelog:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: "actions/checkout@v4"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Publish Docker Image

on:
on:
push:
branches: ["development"]
paths:
- Dockerfile
- Dockerfile
- docker-compose.yml
- scripts/.zshrc

jobs:
publish-hello-docker-image:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/duplicate-indexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
jobs:
generateMatrix:
name: "Generate matrix from cabal"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
Expand All @@ -21,7 +21,7 @@ jobs:
uses: kleidukos/get-tested@v0.1.7.1
with:
cabal-file: flora.cabal
ubuntu-version: "latest"
ubuntu-version: "22.04"
version: 0.1.7.1

duplicate-index-check:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
Frontend_tests:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
fourmolu:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

Expand All @@ -20,7 +20,7 @@ jobs:
app/**/*.hs
hlint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/missing-fk-indexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
jobs:
generateMatrix:
name: "Generate matrix from cabal"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
Expand All @@ -21,7 +21,7 @@ jobs:
uses: kleidukos/get-tested@v0.1.7.1
with:
cabal-file: flora.cabal
ubuntu-version: "latest"
ubuntu-version: "22.04"
version: 0.1.7.1

missing-fk-index-check:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt -y update
sudo apt -y install postgresql-14 g++ mcpp libffi7 llvm zlib1g-dev
sudo apt -y install postgresql-16 g++ mcpp libffi7 llvm zlib1g-dev

wget /~https://github.com/souffle-lang/souffle/releases/download/2.2/x86_64-ubuntu-2004-souffle-2.2-Linux.deb
sudo dpkg -i ./x86_64-ubuntu-2004-souffle-2.2-Linux.deb
6 changes: 3 additions & 3 deletions .github/workflows/test-docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Build Docker Image

on:
on:
pull_request:
branches: ["main", "development"]
paths:
- Dockerfile
- Dockerfile
- docker-compose.yml
- scripts/.zshrc

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
Expand Down
16 changes: 8 additions & 8 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ package zlib
source-repository-package
type: git
location: /~https://github.com/haskell/security-advisories/
tag: b6eca11d65ab18fce60030d1dba7793789157292
tag: d305942f9582bac9f90fb686c2573ba5a0c18cc5
subdir:
./code/cvss
./code/osv
Expand All @@ -47,7 +47,7 @@ source-repository-package
source-repository-package
type: git
location: /~https://github.com/scrive/tracing
tag: 9c2baa1
tag: 9c2baa154dbd0ef2c145ee65660261977323c2d8
subdir:
.
./tracing-effectful
Expand All @@ -61,32 +61,32 @@ source-repository-package
source-repository-package
type: git
location: /~https://github.com/flora-pm/wai-middleware-heartbeat
tag: 5b56e1d
tag: 5b56e1dd294b6dbc9d25e2e03fb7d4d8b4baf3b2

source-repository-package
type: git
location: /~https://github.com/kleidukos/pg-transact-effectful
tag: d3f3f3d
tag: 0f3de0516cb66efbfa6c437ef77c2774bd1325cb

source-repository-package
type: git
location: /~https://github.com/kleidukos/servant-effectful
tag: cec4d54
tag: 22af09642078d5296b524495ad8213bf2ace62d2

source-repository-package
type: git
location: /~https://github.com/saurabhnanda/odd-jobs
tag: a159d7a
tag: a159d7a17913725a0cb2a2251fa0b812acd3d160

source-repository-package
type: git
location: /~https://github.com/luc-tielen/souffle-haskell
tag: 268a112
tag: 268a11283ca9293b5eacabf7a0b79d9368232478

source-repository-package
type: git
location: /~https://github.com/goodlyrottenapple/tasty-test-reporter
tag: b704130
tag: b704130545aa3925a8487bd3e92f1dd5ce0512e2

source-repository-package
type: git
Expand Down
2 changes: 2 additions & 0 deletions changelog.d/817
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
synopsis: Do not wrongly include "Nothing" as a query param to dependents listing pages' URL
prs: #817
4 changes: 3 additions & 1 deletion src/web/FloraWeb/Components/PaginationNav.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ mkURL (ListAllPackagesInNamespace namespace) pageNumber =
mkURL (SearchPackages searchTerm) pageNumber =
"/" <> toUrlPiece (Links.packageSearchLink searchTerm pageNumber)
mkURL (DependentsOf namespace packageName mbSearchString) pageNumber =
Links.dependentsPage namespace packageName pageNumber <> "q=" <> toUrlPiece mbSearchString
case mbSearchString of
Nothing -> Links.dependentsPage namespace packageName pageNumber
Just searchString -> Links.dependentsPage namespace packageName pageNumber <> "q=" <> toUrlPiece mbSearchString

Check warning on line 54 in src/web/FloraWeb/Components/PaginationNav.hs

View workflow job for this annotation

GitHub Actions / Backend_tests (9.6.6, ubuntu-22.04)

Defined but not used: ‘searchString’
mkURL (SearchExecutable searchString) pageNumber =
"/" <> toUrlPiece (Links.packageWithExecutable pageNumber searchString)
mkURL (SearchInAdvisories searchString) pageNumber =
Expand Down

0 comments on commit 70b38d9

Please sign in to comment.