diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index d87e3212..df29128e 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -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: @@ -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: diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index c95388f9..d6cfb10b 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -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" diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f7dab565..55ce1524 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -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 diff --git a/.github/workflows/duplicate-indexes.yaml b/.github/workflows/duplicate-indexes.yaml index a4148b11..ac7973dc 100644 --- a/.github/workflows/duplicate-indexes.yaml +++ b/.github/workflows/duplicate-indexes.yaml @@ -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: @@ -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: diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index f6028947..f8a706c0 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -7,7 +7,7 @@ on: jobs: Frontend_tests: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index ccc9eecb..8c730a0e 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -7,7 +7,7 @@ on: jobs: fourmolu: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -20,7 +20,7 @@ jobs: app/**/*.hs hlint: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/missing-fk-indexes.yml b/.github/workflows/missing-fk-indexes.yml index ab347e53..f185da40 100644 --- a/.github/workflows/missing-fk-indexes.yml +++ b/.github/workflows/missing-fk-indexes.yml @@ -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: @@ -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: diff --git a/.github/workflows/setup.sh b/.github/workflows/setup.sh index a67201bb..bd4d676e 100755 --- a/.github/workflows/setup.sh +++ b/.github/workflows/setup.sh @@ -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 diff --git a/.github/workflows/test-docker-image.yml b/.github/workflows/test-docker-image.yml index c74464d9..06ba5aa3 100644 --- a/.github/workflows/test-docker-image.yml +++ b/.github/workflows/test-docker-image.yml @@ -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 diff --git a/cabal.project b/cabal.project index 61ffc8d8..435fffc3 100644 --- a/cabal.project +++ b/cabal.project @@ -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 @@ -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 @@ -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 diff --git a/changelog.d/817 b/changelog.d/817 new file mode 100644 index 00000000..964e66d5 --- /dev/null +++ b/changelog.d/817 @@ -0,0 +1,2 @@ +synopsis: Do not wrongly include "Nothing" as a query param to dependents listing pages' URL +prs: #817 diff --git a/src/web/FloraWeb/Components/PaginationNav.hs b/src/web/FloraWeb/Components/PaginationNav.hs index d6b6454b..95b50018 100644 --- a/src/web/FloraWeb/Components/PaginationNav.hs +++ b/src/web/FloraWeb/Components/PaginationNav.hs @@ -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 mkURL (SearchExecutable searchString) pageNumber = "/" <> toUrlPiece (Links.packageWithExecutable pageNumber searchString) mkURL (SearchInAdvisories searchString) pageNumber =