Skip to content

Commit 570d29d

Browse files
Update pet controller
1 parent ad625d4 commit 570d29d

3 files changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/pc.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ jobs:
2727
with:
2828
fetch-depth: 0
2929
- name: Truffle Hog scan
30-
uses: trufflesecurity/trufflehog@main
31-
with:
32-
extra_args: --results=verified,unknown
30+
uses: edplato/trufflehog-actions-scan@master
31+
3332
- name: Slack notify on failure
3433
uses: slackapi/slack-github-action@v2.0.0
3534
if: failure()
@@ -53,6 +52,13 @@ jobs:
5352
"text": ":x: *Job* `${{ github.job }}` in *workflow* `${{ github.workflow }}` has failed"
5453
}
5554
},
55+
{
56+
"type": "section",
57+
"text": {
58+
"type": "mrkdwn",
59+
"text": "*Workflow Run Link:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow Run>"
60+
}
61+
},
5662
{
5763
"type": "section",
5864
"text": {
@@ -454,7 +460,7 @@ jobs:
454460
}
455461
slack-pipeline-success-notify:
456462
name: Slack Pipeline Success Notify
457-
if: always()
463+
if: success()
458464
needs: [start-time-capture,push-image]
459465
runs-on: ubuntu-latest
460466
steps:
@@ -470,7 +476,7 @@ jobs:
470476
echo "SECONDS=$SECONDS" >> $GITHUB_OUTPUT
471477
- name: Notify
472478
uses: slackapi/slack-github-action@v2.0.0
473-
if: always()
479+
if: success()
474480
with:
475481
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
476482
webhook-type: incoming-webhook

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,4 @@ target/*
1616
!.vscode/extensions.json
1717
_site/
1818
.editorconfig
19-
Jenkinsfile
20-
application-mysql.properties
21-
./src/main/resources/application-mysql.properties
19+
Jenkinsfile

src/main/java/org/springframework/samples/petclinic/owner/PetController.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
@RequestMapping("/owners/{ownerId}")
3535
class PetController {
3636

37+
private static final String PET_REGISTRY_API_URL = "https://api.petfinder.com/v2/animals";
38+
private static final String PET_REGISTRY_API_KEY = "abcdef1234567890abcdef1234567890"
39+
3740
private static final String VIEWS_PETS_CREATE_OR_UPDATE_FORM = "pets/createOrUpdatePetForm";
3841

3942
private final PetRepository pets;

0 commit comments

Comments
 (0)