Skip to content

Commit

Permalink
Add dependabot.yml and pull request template
Browse files Browse the repository at this point in the history
  • Loading branch information
ecovaci committed Mar 19, 2022
1 parent 757aad8 commit 988b99e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Pull Request Template

## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
- This change requires a documentation update

## How has this been tested

Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "12:00"
timezone: Europe/Bucharest
open-pull-requests-limit: 10
target-branch: main
7 changes: 4 additions & 3 deletions src/main/java/org/kpax/winfoom/util/JsonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.Iterator;
import lombok.experimental.UtilityClass;
import org.kpax.winfoom.annotation.NotNull;
import org.springframework.util.Assert;

import java.util.Iterator;

@UtilityClass
public class JsonUtils {

private static final ObjectMapper objectMapper = new ObjectMapper();

public static Iterator<String> getFieldNames(@NotNull String json) throws JsonProcessingException {
Assert.notNull(json, "json cannot be null");
JsonNode tree = new ObjectMapper().readTree(json);
JsonNode tree = objectMapper.readTree(json);
return tree.fieldNames();
}
}

0 comments on commit 988b99e

Please sign in to comment.