Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 33 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,36 @@ jobs:
uses: actions/[email protected]
with:
name: jacoco-report
path: target/site/jacoco
path: target/site/jacoco

format:
name: Format Code
permissions:
contents: write
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.ref}}
fetch-depth: 0

- name: Instalar Java 25
uses: actions/[email protected]
with:
distribution: "temurin"
java-version: 25
- name: Formatar código com Spotless
run: ./mvnw spotless:apply

- name: Faz um commit e push das mudanças
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
if ! git diff --staged --quiet; then
git commit -m "Aplica formatação do spotless"
git push
else
echo "Nenhuma mudança de formatação necessária."
fi
43 changes: 0 additions & 43 deletions .github/workflows/spotless.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ public ResponseEntity<ReminderResponseDTO> findById(@PathVariable Long id) {
return ResponseEntity.ok(reminderService.findById(id));
}

@PostMapping
@PostMapping()
public ResponseEntity<ReminderResponseDTO> create(@RequestBody @Valid CreateReminderRequestDTO dto) {
return ResponseEntity.status(HttpStatus.CREATED).body(reminderService.create(dto));
}

@PutMapping("/{id}")
public ResponseEntity<ReminderResponseDTO> update(
@PathVariable Long id, @RequestBody @Valid UpdateReminderRequestDTO dto)
{
@PathVariable Long id, @RequestBody @Valid UpdateReminderRequestDTO dto) {
return ResponseEntity.ok(reminderService.update(id, dto));
}

Expand Down