Skip to content

Commit

Permalink
merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
achimber-moj committed Dec 11, 2024
2 parents 410ba1f + 8948a7e commit 58ae57e
Show file tree
Hide file tree
Showing 43 changed files with 743 additions and 197 deletions.
4 changes: 2 additions & 2 deletions .github/actions/analyse/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
shell: bash

- name: Publish test reports
uses: mikepenz/action-junit-report@a427a90771729d8f85b6ab0cdaa1a5929cab985d # v5
uses: mikepenz/action-junit-report@992d97d6eb2e5f3de985fbf9df6a04386874114d # v5
if: always() && github.actor != 'dependabot[bot]'
with:
check_name: |-
Expand All @@ -51,7 +51,7 @@ runs:

- name: Sonar analysis
if: github.actor != 'dependabot[bot]'
run: ./gradlew sonar
run: ./gradlew sonar -Dsonar.projectVersion="$VERSION"
shell: bash
env:
SONAR_TOKEN: ${{ inputs.sonar-token }}
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ jobs:
- name: Deploy main
if: github.ref_name == 'main'
uses: JamesIves/github-pages-deploy-action@62fec3add6773ec5dbbf18d2ee4260911aa35cf4 # v4.6.9
uses: JamesIves/github-pages-deploy-action@15de0f09300eea763baee31dff6c6184995c5f6a # v4.7.2
with:
folder: tech-docs
target-folder: tech-docs

- name: Deploy branch
if: github.ref_name != 'main'
uses: JamesIves/github-pages-deploy-action@62fec3add6773ec5dbbf18d2ee4260911aa35cf4 # v4.6.9
uses: JamesIves/github-pages-deploy-action@15de0f09300eea763baee31dff6c6184995c5f6a # v4.7.2
with:
folder: tech-docs
target-folder: tech-docs-drafts/${{ github.ref_name }}
2 changes: 1 addition & 1 deletion .github/workflows/schema-spy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
DB_PASSWORD: ${{ secrets.SCHEMA_SPY_PASSWORD }}

- name: Publish HTML report
uses: JamesIves/github-pages-deploy-action@62fec3add6773ec5dbbf18d2ee4260911aa35cf4 # v4.6.9
uses: JamesIves/github-pages-deploy-action@15de0f09300eea763baee31dff6c6184995c5f6a # v4.7.2
with:
folder: schema-spy-report
target-folder: schema-spy-report
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import uk.gov.justice.digital.hmpps.plugins.ClassPathPlugin
import uk.gov.justice.digital.hmpps.plugins.JibConfigPlugin

plugins {
kotlin("jvm") version "2.0.21"
kotlin("plugin.spring") version "2.0.21" apply false
kotlin("plugin.jpa") version "2.0.21" apply false
kotlin("jvm") version "2.1.0"
kotlin("plugin.spring") version "2.1.0" apply false
kotlin("plugin.jpa") version "2.1.0" apply false
id("org.springframework.boot") version "3.4.0" apply false
id("io.spring.dependency-management") version "1.1.6" apply false
id("com.gorylenko.gradle-git-properties") version "2.4.2" apply false
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("com.google.cloud.tools.jib") version "3.4.4" apply false
id("org.sonarqube") version "6.0.0.5145" apply false
id("org.sonarqube") version "6.0.1.5171" apply false
`kotlin-dsl`
}

Expand All @@ -12,5 +12,5 @@ repositories {

dependencies {
implementation("com.google.cloud.tools:jib-gradle-plugin:3.4.4")
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:6.0.0.5145")
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:6.0.1.5171")
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ object EventDetailsGenerator {
private fun staffMember(staff: Staff, username: String? = null) = StaffMember(
username = username,
staffCode = staff.code,
staffIdentifier = staff.id,
forenames = staff.forename,
surname = staff.surname
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ object StaffMemberGenerator {

fun generate(
staffCode: String = "N54A001",
staffIdentifier: Long = 1501234567,
forenames: String = "John",
surname: String = "Smith",
username: String? = null
) = StaffMember(
staffCode = staffCode,
staffIdentifier = staffIdentifier,
forenames = forenames,
surname = surname,
username = username
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class StaffControllerIntegrationTest {
assertThat(res.code, equalTo(StaffGenerator.DEFAULT_STAFF.code))
assertThat(res.email, equalTo("[email protected]"))
assertThat(res.telephoneNumber, equalTo("07321165373"))
assertThat(res.staffIdentifier, equalTo(StaffGenerator.DEFAULT_STAFF.id))
assertThat(res.teams[0].borough?.code, equalTo(StaffGenerator.DEFAULT_STAFF.teams[0].district.borough.code))
assertThat(
res.teams[0].borough?.description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package uk.gov.justice.digital.hmpps.integrations.approvedpremises

data class StaffMember(
val staffCode: String,
val staffIdentifier: Long,
val forenames: String,
val surname: String,
val username: String?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ data class ProbationArea(
data class StaffDetail(
val email: String?,
val telephoneNumber: String?,
val staffIdentifier: Long,
val teams: List<Team> = emptyList(),
val probationArea: ProbationArea,
val username: String?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class StaffService(
code = probationArea.code,
description = probationArea.description
),
active = isActive(),
staffIdentifier = id
active = isActive()
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"header": { "totalresults": 0 },
"results": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"header": {
"totalresults": 1
},
"results": [
{
"DPA": {
"UPRN": 123456789012,
"UDPRN": 12345678,
"ADDRESS": "123 Test Street, Test, AB1 2CD",
"POSTCODE": "AB1 2CD",
"BUILDING_NUMBER": 123,
"THOROUGHFARE_NAME": "Test Street",
"POST_TOWN": "Test",
"RPC": "2",
"X_COORDINATE": 123456.78,
"Y_COORDINATE": 876543.21,
"STATUS": "APPROVED",
"MATCH": 0.9,
"LANGUAGE": "EN",
"COUNTRY_CODE": "E",
"COUNTRY_CODE_DESCRIPTION": "This record is within England",
"LOCAL_CUSTODIAN_CODE": 1760,
"LOCAL_CUSTODIAN_CODE_DESCRIPTION": "Test",
"CLASSIFICATION_CODE": "CO01GV",
"CLASSIFICATION_CODE_DESCRIPTION": "Central Government Service",
"POSTAL_ADDRESS_CODE": "D",
"POSTAL_ADDRESS_CODE_DESCRIPTION": "A record which is linked to PAF",
"LOGICAL_STATUS_CODE": 1,
"BLPU_STATE_CODE": 2,
"BLPU_STATE_CODE_DESCRIPTION": "In use",
"TOPOGRAPHY_LAYER_TOID": "osgb1234567890123456",
"LAST_UPDATE_DATE": "2024-01-01",
"ENTRY_DATE": "2024-01-01",
"DELIVERY_POINT_SUFFIX": "1A",
"PARISH_CODE": "E87654321",
"WARD_CODE": "E12345678"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"request": {
"method": "GET",
"urlPath": "/address-lookup/search/places/v1/find"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"bodyFileName": "address-lookup-single-result.json"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"request": {
"method": "POST",
"urlPath": "/probation-search/match"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"bodyFileName": "probation-search-no-results.json"
}
}
Loading

0 comments on commit 58ae57e

Please sign in to comment.