Skip to content

Commit

Permalink
Merge branch 'master' into support.byte.array
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma authored Apr 19, 2024
2 parents 762ab2e + 95c8253 commit 7e1e0fa
Show file tree
Hide file tree
Showing 192 changed files with 10,296 additions and 1,402 deletions.
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: "maven"
target-branch: "master"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
- package-ecosystem: "maven"
target-branch: "1.5"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
46 changes: 27 additions & 19 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ jobs:
CodeQL-Build:

runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
Expand All @@ -27,28 +34,29 @@ jobs:
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 11
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
with:
languages: java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven and Gradle
run: |
./mvnw --no-transfer-progress -B install --file pom.xml
cd ./modules/swagger-gradle-plugin
./gradlew build --info
cd ../..
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
16 changes: 16 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: Dependency Review
uses: actions/dependency-review-action@v3
with:
fail-on-severity: high
6 changes: 3 additions & 3 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Set up Python 2.7
uses: actions/setup-python@v2
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 2.x
python-version: '3.10'
- name: Set up Java 11
uses: actions/setup-java@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Set up Python 2.7
uses: actions/setup-python@v2
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 2.x
python-version: '3.10'
- name: Set up Java 11
uses: actions/setup-java@v1
with:
Expand Down
117 changes: 0 additions & 117 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
20 changes: 18 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.6.jar
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
47 changes: 24 additions & 23 deletions CI/ghApiClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import os
import time
import urllib2
import httplib
import urllib.request, urllib.error, urllib.parse
import http.client
import json

GH_BASE_URL = "https://api.github.com/"
Expand All @@ -13,46 +13,47 @@

def readUrl(name):
try:
request = urllib2.Request(GH_BASE_URL + name)
request = urllib.request.Request(GH_BASE_URL + name)
request.add_header("Authorization", GH_AUTH)
content = urllib2.urlopen(request).read()
content = urllib.request.urlopen(request).read()
jcont = json.loads(content)
return jcont;
except urllib2.HTTPError as e:
print ('HTTPError = ' + str(e.code))
return jcont
except urllib.error.HTTPError as e:
print(('HTTPError = ' + str(e.code)))
raise e
except urllib2.URLError as e:
print ('URLError = ' + str(e.reason))
except urllib.error.URLError as e:
print(('URLError = ' + str(e.reason)))
raise e
except httplib.HTTPException as e:
print ('HTTPException = ' + str(e))
except http.client.HTTPException as e:
print(('HTTPException = ' + str(e)))
raise e
except Exception:
import traceback
print ('generic exception: ' + traceback.format_exc())
print(('generic exception: ' + traceback.format_exc()))
raise IOError

def postUrl(name, body):
global GH_BASE_URL
try:
time.sleep(0.05)
request = urllib2.Request(GH_BASE_URL + name)
request = urllib.request.Request(GH_BASE_URL + name)
request.add_header("Authorization", GH_AUTH)
request.add_header("Accept", "application/vnd.github.v3+json")
content = urllib2.urlopen(request, body).read()
data = body.encode('utf-8')
content = urllib.request.urlopen(request, data).read()
jcont = json.loads(content)
return jcont;
except urllib2.HTTPError as e:
print ('HTTPError = ' + str(e.code))
print (str(e))
return jcont
except urllib.error.HTTPError as e:
print(('HTTPError = ' + str(e.code)))
print((str(e)))
raise e
except urllib2.URLError as e:
print ('URLError = ' + str(e.reason))
except urllib.error.URLError as e:
print(('URLError = ' + str(e.reason)))
raise e
except httplib.HTTPException as e:
print ('HTTPException = ' + str(e))
except http.client.HTTPException as e:
print(('HTTPException = ' + str(e)))
raise e
except Exception:
import traceback
print ('generic exception: ' + traceback.format_exc())
print(('generic exception: ' + traceback.format_exc()))
raise IOError
15 changes: 8 additions & 7 deletions CI/releaseNotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ def allPulls(releaseDate):
baseurl = "https://api.github.com/repos/swagger-api/swagger-core/pulls/"
content = ghApiClient.readUrl('repos/swagger-api/swagger-core/pulls?state=closed&base=master&per_page=100')
for l in content:
stripped = l["url"][len(baseurl):]
mergedAt = l["merged_at"]
if mergedAt is not None:
if datetime.strptime(mergedAt, '%Y-%m-%dT%H:%M:%SZ') > releaseDate:
if not l['title'].startswith("bump snap"):
result += '\n'
result += "* " + l['title'] + " (#" + stripped + ")"
stripped = l["url"][len(baseurl):]
mergedAt = l["merged_at"]
if mergedAt is not None:
if datetime.strptime(mergedAt, '%Y-%m-%dT%H:%M:%SZ') > releaseDate:
if not l['title'].startswith("bump snap"):
result += '\n'
result += "* " + l['title'] + " (#" + stripped + ")"
return result


Expand Down Expand Up @@ -49,3 +49,4 @@ def main(last_release, release_title, tag):

# here start main
main(sys.argv[1], sys.argv[2], sys.argv[3])

Loading

0 comments on commit 7e1e0fa

Please sign in to comment.