Skip to content
Open
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
37 changes: 30 additions & 7 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Build

on:
push:
branches-ignore:
- 'dependabot/**'
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

Expand All @@ -20,22 +20,22 @@ jobs:
ports:
- 8090:80
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: adopt-hotspot
distribution: temurin
java-version: 11
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
echo "date=$(/bin/date -u "+%Y-%m")" >> "$GITHUB_OUTPUT"
shell: bash
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
# refresh cache every month to avoid unlimited growth
Expand All @@ -44,3 +44,26 @@ jobs:
id: gitlab4j-verify
run: |
./mvnw verify -B -V

publish:
name: "Publish to GitHub Packages"
runs-on: ubuntu-latest
needs: build-jdk11
if: github.event_name == 'pull_request'
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Deploy
run: mvn deploy -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 11 additions & 5 deletions .github/workflows/ci-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ jobs:
publish:
name: "Build JDK 11"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
services:
gitlab-instance:
image: gitlab/gitlab-ce:12.9.2-ce.0
Expand All @@ -15,22 +18,25 @@ jobs:
ports:
- 8090:80
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: adopt-hotspot
distribution: temurin
java-version: 11
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
echo "date=$(/bin/date -u "+%Y-%m")" >> "$GITHUB_OUTPUT"
shell: bash
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
# refresh cache every month to avoid unlimited growth
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>org.gitlab4j</groupId>
<artifactId>gitlab4j-api-cortex</artifactId>
<packaging>jar</packaging>
<version>6.0.4</version>
<version>6.0.5</version>
<name>GitLab4J-API - GitLab API Java Client</name>
<description>GitLab4J-API (gitlab4j-api) provides a full featured Java client library for working with GitLab repositories and servers via the GitLab REST API.</description>
<url>https://github.com/gitlab4j/gitlab4j-api</url>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/gitlab4j/api/utils/JacksonJson.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.module.SimpleModule;
Expand All @@ -59,7 +59,7 @@ public JacksonJson() {
objectMapper = new ObjectMapper();

objectMapper.setSerializationInclusion(Include.NON_NULL);
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);

objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
Expand Down Expand Up @@ -349,7 +349,7 @@ public List<User> deserialize(JsonParser jsonParser, DeserializationContext cont
private static class JacksonJsonSingletonHelper {
private static final JacksonJson JACKSON_JSON = new JacksonJson();
static {
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.LOWER_CAMEL_CASE);
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE);
JACKSON_JSON.objectMapper.setSerializationInclusion(Include.ALWAYS);
}
}
Expand Down
Loading