Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development: Analyze REST calls and endpoints #8771

Merged
merged 423 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
423 commits
Select commit Hold shift + click to select a range
92ad0b9
implement most of @Markus' feedback
Jan-Thurner Jun 9, 2024
bb542e3
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Jun 9, 2024
5b283b3
Merge remote-tracking branch 'origin/feature/development/parsing-clie…
Jan-Thurner Jun 9, 2024
bca05fb
Merge remote-tracking branch 'origin/feature/development/parsing-clie…
Jan-Thurner Jun 9, 2024
29cfb3d
add testChange
Jan-Thurner Jun 9, 2024
3c37828
check if httpClient is of type httpClient
Jan-Thurner Jun 9, 2024
e2c2015
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 10, 2024
cacb0c2
finish merge
Jan-Thurner Jun 10, 2024
bec6ecd
extract methods to improve code quality
Jan-Thurner Jun 12, 2024
cacd193
group rest calls from the same files together
Jan-Thurner Jun 12, 2024
e1d7b4c
add more test changes
Jan-Thurner Jun 12, 2024
1db18df
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Jun 12, 2024
b64c9d0
remove test changes
Jan-Thurner Jun 12, 2024
39ccb76
Merge remote-tracking branch 'origin/feature/development/parsing-clie…
Jan-Thurner Jun 12, 2024
e94ae43
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 12, 2024
66f11bb
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 12, 2024
8c83925
merge feature/development/parsing-client-sided-REST-api into this branch
Jan-Thurner Jun 12, 2024
6388c14
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Jun 14, 2024
b898326
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Jun 14, 2024
7ecfa77
Somehow parsing ModelParsers does not work
Jan-Thurner Jun 17, 2024
3e7d961
store result of Endpoint Analysis in .json end add helper method to f…
Jan-Thurner Jun 17, 2024
df347da
store result of Endpoint Analysis in .json end add helper method to f…
Jan-Thurner Jun 17, 2024
fdcc886
implement feedback
Jan-Thurner Jun 17, 2024
5d616f2
Merge remote-tracking branch 'origin/feature/development/parsing-clie…
Jan-Thurner Jun 17, 2024
c8c01dc
EndpointAnalysis More complete and comprehensive. Also a bugfix regar…
Jan-Thurner Jun 20, 2024
af771d8
only add restCallFile if there are REST calls existing in said file.
Jan-Thurner Jun 20, 2024
70cf864
improve EndpointParser
Jan-Thurner Jun 20, 2024
e188c1f
split AnalysisOfEndpointConnections into 3 modules:
Jan-Thurner Jun 21, 2024
b3e7ba1
Merge remote-tracking branch 'origin/feature/development/analyze-REST…
Jan-Thurner Jun 21, 2024
0d5513e
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Jun 21, 2024
a9e7013
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 21, 2024
98f6baf
merge feature/development/parsing-client-sided-rest-api
Jan-Thurner Jun 21, 2024
a011679
move client sided parsing to parser module
Jan-Thurner Jun 21, 2024
268e33c
delete .json files
Jan-Thurner Jun 21, 2024
f220506
update workflow file
Jan-Thurner Jun 21, 2024
7582707
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 21, 2024
74de9c1
update workflow file
Jan-Thurner Jun 21, 2024
34b19fd
Merge remote-tracking branch 'origin/feature/development/analyze-REST…
Jan-Thurner Jun 21, 2024
b087b43
update workflow file
Jan-Thurner Jun 21, 2024
123908b
update workflow file
Jan-Thurner Jun 21, 2024
d9f419d
debug workflow file
Jan-Thurner Jun 21, 2024
928e28f
debug workflow file
Jan-Thurner Jun 21, 2024
18c2b6b
debug workflow file
Jan-Thurner Jun 21, 2024
dd61e97
debug workflow file
Jan-Thurner Jun 21, 2024
a3ba205
debug workflow file
Jan-Thurner Jun 21, 2024
bb6cd1a
debug workflow file
Jan-Thurner Jun 21, 2024
b6edda2
debug workflow file
Jan-Thurner Jun 21, 2024
a4be6ef
debug workflow file
Jan-Thurner Jun 21, 2024
7f8afc2
debug workflow file
Jan-Thurner Jun 21, 2024
f177cff
debug workflow file
Jan-Thurner Jun 21, 2024
baca8cb
debug workflow file
Jan-Thurner Jun 21, 2024
08f3cb8
debug workflow file
Jan-Thurner Jun 21, 2024
f6a96d1
debug workflow file
Jan-Thurner Jun 21, 2024
cef046b
debug workflow file
Jan-Thurner Jun 21, 2024
d67e61d
debug workflow file
Jan-Thurner Jun 21, 2024
edb4934
debug workflow file
Jan-Thurner Jun 21, 2024
9a840c5
debug workflow file
Jan-Thurner Jun 21, 2024
23c68a6
debug workflow file
Jan-Thurner Jun 21, 2024
5f78d78
debug workflow file
Jan-Thurner Jun 21, 2024
83c05ea
Feedback Stephan
Jan-Thurner Jun 23, 2024
ba521e6
Feedback Stephan
Jan-Thurner Jun 23, 2024
39a9139
testChange
Jan-Thurner Jun 23, 2024
a82dcaa
Merge remote-tracking branch 'origin/feature/development/parsing-clie…
Jan-Thurner Jun 23, 2024
f2fd984
add javadocs
Jan-Thurner Jun 23, 2024
07ae891
use CommonJs
Jan-Thurner Jun 23, 2024
85c78c3
remove testChange
Jan-Thurner Jun 23, 2024
da26bbb
remove ^
Jan-Thurner Jun 23, 2024
541ebed
remove type from tsDox
Jan-Thurner Jun 23, 2024
eb251f3
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Jun 23, 2024
144107a
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 23, 2024
db04b31
merge feature/development/parsing-client-sided-REST-api
Jan-Thurner Jun 23, 2024
4ab29fc
debugging action - modify parser result filePath
Jan-Thurner Jun 23, 2024
e53d69c
debugging action
Jan-Thurner Jun 23, 2024
2d092e6
debugging action
Jan-Thurner Jun 23, 2024
f31a2e3
debugging action
Jan-Thurner Jun 23, 2024
533ec36
make sure the second job runs after the first one is completed.
Jan-Thurner Jun 23, 2024
bbec0d0
debugging action
Jan-Thurner Jun 23, 2024
eabd5b3
debugging action
Jan-Thurner Jun 23, 2024
516ff0c
debugging action
Jan-Thurner Jun 23, 2024
56c644f
debugging action
Jan-Thurner Jun 23, 2024
35cb507
debugging action
Jan-Thurner Jun 23, 2024
2ca26a9
debugging action
Jan-Thurner Jun 23, 2024
fc9f9f7
debugging action
Jan-Thurner Jun 23, 2024
29ed59a
debugging action
Jan-Thurner Jun 23, 2024
5e45ef1
debugging action
Jan-Thurner Jun 23, 2024
aec876b
debugging action
Jan-Thurner Jun 23, 2024
52ec491
debugging action
Jan-Thurner Jun 23, 2024
f2420ee
debugging action
Jan-Thurner Jun 23, 2024
74501eb
debugging action
Jan-Thurner Jun 23, 2024
f79f67e
debugging action
Jan-Thurner Jun 23, 2024
004b843
debugging action
Jan-Thurner Jun 23, 2024
d4c5549
debugging action
Jan-Thurner Jun 23, 2024
e52030e
debugging action
Jan-Thurner Jun 23, 2024
3a05f50
debugging action
Jan-Thurner Jun 23, 2024
7670c50
shared module
Jan-Thurner Jun 24, 2024
4acc2ce
shared module
Jan-Thurner Jun 24, 2024
ff74221
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Jun 24, 2024
603ed82
improve parser
Jan-Thurner Jun 25, 2024
c979794
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 25, 2024
17772ba
improve parser. now also parse 'this.http.get<OrganizationCountDto[]>…
Jan-Thurner Jun 27, 2024
c74c4bf
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 27, 2024
30dea8a
more testing
Jan-Thurner Jun 27, 2024
9ea2c06
parser now recognizes method variables
Jan-Thurner Jun 28, 2024
02c69ff
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 28, 2024
955e167
more testing
Jan-Thurner Jun 28, 2024
979e053
REST calls with multiple possible URLs in a single function are logged.
Jan-Thurner Jun 28, 2024
739560a
REST calls with multiple possible URLs in multiple functions are logged.
Jan-Thurner Jun 28, 2024
474a112
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 29, 2024
1583419
Revert "REST calls with multiple possible URLs in multiple functions …
Jan-Thurner Jun 29, 2024
60a4c45
Revert REST calls with multiple possible URLs in multiple functions a…
Jan-Thurner Jun 29, 2024
f155458
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jun 29, 2024
bd41c4c
remove old parser
Jan-Thurner Jul 3, 2024
57e0467
almost done
Jan-Thurner Jul 13, 2024
3ebc22a
only a few bugs remaining
Jan-Thurner Jul 14, 2024
962fd07
still needs documentation
Jan-Thurner Jul 15, 2024
2ec7263
removed unused code
Jan-Thurner Jul 15, 2024
9a36750
Store identified RestCalls in .json file
Jan-Thurner Jul 15, 2024
cfa6a01
so far, the refactored code works
Jan-Thurner Jul 25, 2024
83099f0
refactor BinaryExpressions too
Jan-Thurner Jul 25, 2024
b517a44
last edge case implemented
Jan-Thurner Jul 25, 2024
9ac520f
fix stack Overflow (remove potential endless loop)
Jan-Thurner Jul 26, 2024
abb94ce
- remove test Files
Jan-Thurner Jul 26, 2024
eb5a63f
replace reduce with for loop for cleaner control flow
Jan-Thurner Jul 26, 2024
d01c61d
Catch URLs that cannot be parsed.
Jan-Thurner Jul 26, 2024
401d948
remove unused code
Jan-Thurner Jul 26, 2024
642b39a
Preprocessor: remove unused code and add documentation
Jan-Thurner Jul 27, 2024
ea91e2f
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Jul 27, 2024
6005644
parse entire client
Jan-Thurner Jul 27, 2024
4ec9aaa
add test change to start action
Jan-Thurner Jul 27, 2024
10dd980
debugging Action and CWD
Jan-Thurner Jul 27, 2024
3ed69af
run serverSided analysis only on changed Files
Jan-Thurner Jul 27, 2024
c5d06e0
print output to logFile instead of console for now
Jan-Thurner Jul 27, 2024
da20f0e
upload logFile
Jan-Thurner Jul 27, 2024
eab5823
change ResultFilePath
Jan-Thurner Jul 27, 2024
6a010c5
more debugging
Jan-Thurner Jul 27, 2024
004cb2c
more debugging
Jan-Thurner Jul 27, 2024
7fae762
more debugging
Jan-Thurner Jul 27, 2024
d688871
remove test change and small Docs improvement
Jan-Thurner Jul 27, 2024
06ee46e
CodeRabbit
Jan-Thurner Jul 27, 2024
ba94287
CodeRabbit
Jan-Thurner Jul 27, 2024
aecbef1
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Jul 28, 2024
405065e
Update .github/workflows/analysis-of-endpoint-connections.yml
Jan-Thurner Jul 28, 2024
c53c68e
Update .github/workflows/analysis-of-endpoint-connections.yml
Jan-Thurner Jul 28, 2024
f6a4489
Merge branch 'feature/development/parsing-client-sided-REST-api' into…
Jan-Thurner Jul 28, 2024
4947a59
finish merge
Jan-Thurner Jul 28, 2024
318e590
small bugfix
Jan-Thurner Jul 28, 2024
8fe19f3
Add Edgecase to server Parser
Jan-Thurner Jul 28, 2024
af4e293
Add Edgecase to server Parser
Jan-Thurner Jul 28, 2024
56d96db
Add Edgecase to server Parser
Jan-Thurner Jul 29, 2024
c502288
fix json parser
Jan-Thurner Jul 29, 2024
a0cc85d
fix json parser
Jan-Thurner Jul 29, 2024
509b257
fix json parser
Jan-Thurner Jul 29, 2024
4a0ca90
fix json parser
Jan-Thurner Jul 29, 2024
d41d673
Json before Changes
Jan-Thurner Aug 4, 2024
f19b38c
Review Feedback
Jan-Thurner Aug 5, 2024
96ed010
update package.json
Jan-Thurner Aug 5, 2024
6a63e41
Update supporting_scripts/analysis-of-endpoint-connections/src/main/t…
Jan-Thurner Aug 5, 2024
e099d04
Update supporting_scripts/analysis-of-endpoint-connections/src/main/t…
Jan-Thurner Aug 5, 2024
3469f37
make ast readonly
Jan-Thurner Aug 5, 2024
fdef534
Merge remote-tracking branch 'origin/feature/development/parsing-clie…
Jan-Thurner Aug 5, 2024
80d3e34
add docs do postprocessor.ts
Jan-Thurner Aug 5, 2024
4c88dc8
remove restCalls json
Jan-Thurner Aug 5, 2024
25f6fbe
remove restCalls json
Jan-Thurner Aug 5, 2024
97c8fe9
run action on workflow dispatch
Jan-Thurner Aug 5, 2024
713557a
update package.json
Jan-Thurner Aug 5, 2024
90c5da9
update package.json
Jan-Thurner Aug 5, 2024
54f6378
update package.json
Jan-Thurner Aug 5, 2024
944ce3e
update package.json
Jan-Thurner Aug 5, 2024
29b7671
update package.json
Jan-Thurner Aug 5, 2024
042094d
remove test change
Jan-Thurner Aug 5, 2024
b706f53
coderabbit
Jan-Thurner Aug 5, 2024
2960f24
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Aug 6, 2024
03725c8
CodeStyle Johannes
Jan-Thurner Aug 7, 2024
d3d9273
Merge branch 'develop' into feature/development/parsing-client-sided-…
Jan-Thurner Aug 8, 2024
a7f5084
merge RestCallParser into this branch
Jan-Thurner Aug 9, 2024
85867b1
fix compiler error after merge
Jan-Thurner Aug 9, 2024
54c4b1b
refactor endpoint analyzer to main module
Jan-Thurner Aug 12, 2024
8b44238
refactor endpoint parser to main module
Jan-Thurner Aug 12, 2024
8bf1c1c
refactor RestCallAnalysis to main module
Jan-Thurner Aug 13, 2024
33226d9
adjust workflow to work on just one module
Jan-Thurner Aug 13, 2024
87e2921
Upload Analysis Results
Jan-Thurner Aug 13, 2024
634094f
remove now unused modules
Jan-Thurner Aug 13, 2024
f37b1aa
debugging action
Jan-Thurner Aug 13, 2024
673399e
debugging action
Jan-Thurner Aug 13, 2024
e84d32e
debugging action
Jan-Thurner Aug 13, 2024
bb99a3c
debugging action
Jan-Thurner Aug 13, 2024
7d0c203
debugging action
Jan-Thurner Aug 13, 2024
ff71cd4
debugging action
Jan-Thurner Aug 13, 2024
6aad084
debugging action
Jan-Thurner Aug 13, 2024
0c78f4e
debugging action
Jan-Thurner Aug 13, 2024
23424bb
debugging action
Jan-Thurner Aug 13, 2024
578347b
debugging action
Jan-Thurner Aug 13, 2024
5160588
debugging action
Jan-Thurner Aug 13, 2024
e612397
debugging action
Jan-Thurner Aug 13, 2024
033da70
debugging action
Jan-Thurner Aug 13, 2024
87049b6
debugging action
Jan-Thurner Aug 13, 2024
a9a7e49
debugging action
Jan-Thurner Aug 13, 2024
2e14693
debugging action
Jan-Thurner Aug 13, 2024
1f6e40b
debugging action
Jan-Thurner Aug 13, 2024
4320f04
remove parsing result files
Jan-Thurner Aug 13, 2024
1839b22
implement follow-up feedback Markus
Jan-Thurner Aug 13, 2024
8a2a656
allow URLs with query parameters to be analyzed correctly.
Jan-Thurner Aug 13, 2024
e07e1da
remove AnalysisOfEndpointConnections.java
Jan-Thurner Aug 13, 2024
4b06cea
remove unnecessary comments
Jan-Thurner Aug 13, 2024
4157768
remove unnecessary code
Jan-Thurner Aug 13, 2024
01748c4
remove unnecessary code and add documentation
Jan-Thurner Aug 13, 2024
3099fda
remove unnecessary code and add documentation
Jan-Thurner Aug 13, 2024
c54155d
merge develop into current branch
Jan-Thurner Aug 13, 2024
183b51c
spotless
Jan-Thurner Aug 13, 2024
34e2d15
reduce complexity of Server Parser
Jan-Thurner Aug 14, 2024
b5a18e1
Merge branch 'develop' into feature/development/analyze-RESTcalls-and…
Jan-Thurner Aug 14, 2024
bfec716
Coderabbit
Jan-Thurner Aug 14, 2024
bf3b707
Merge remote-tracking branch 'origin/feature/development/analyze-REST…
Jan-Thurner Aug 14, 2024
96c2420
spotless
Jan-Thurner Aug 14, 2024
6efa766
revert some coderabbit changes
Jan-Thurner Aug 14, 2024
42b85f7
remove debugging outputs
Jan-Thurner Aug 14, 2024
8495333
undo more CodeRabbit changes
Jan-Thurner Aug 14, 2024
740366a
undo more CodeRabbit changes
Jan-Thurner Aug 14, 2024
e870171
remove trailing blank line
Jan-Thurner Aug 15, 2024
8d53bd8
codeReview Patrik
Jan-Thurner Aug 15, 2024
c89c687
coderabbit
Jan-Thurner Aug 15, 2024
730f00e
add fileNames to logger output
Jan-Thurner Aug 15, 2024
c9962e4
spotless
Jan-Thurner Aug 15, 2024
0842f56
add additional output
Jan-Thurner Aug 15, 2024
a59777f
Update .github/workflows/analysis-of-endpoint-connections.yml
Jan-Thurner Aug 15, 2024
186652f
Update supporting_scripts/analysis-of-endpoint-connections/src/main/j…
Jan-Thurner Aug 16, 2024
28b9bb6
coderabbit
Jan-Thurner Aug 16, 2024
7b36516
delete eslint.conjig.json
Jan-Thurner Aug 16, 2024
9160304
Hacky workaround to prevent weired grouping together of workflows H2 …
Jan-Thurner Aug 16, 2024
68b3c53
name the workflow and remove the hacky solution
Jan-Thurner Aug 16, 2024
23a92d2
remove commented code
Jan-Thurner Aug 16, 2024
0af1eb4
Merge branch 'develop' into feature/development/analyze-RESTcalls-and…
Jan-Thurner Aug 16, 2024
eef32ad
coderabbit
Jan-Thurner Aug 16, 2024
7b62b51
spotless
Jan-Thurner Aug 16, 2024
50e62f7
make model classes to records wherever possible
Jan-Thurner Aug 16, 2024
6730665
Update supporting_scripts/analysis-of-endpoint-connections/src/main/j…
Jan-Thurner Aug 16, 2024
af9441e
Merge remote-tracking branch 'origin/feature/development/analyze-REST…
Jan-Thurner Aug 16, 2024
f1a4000
aniruddh
Jan-Thurner Aug 16, 2024
ad4f2e4
spotless
Jan-Thurner Aug 16, 2024
362d6b0
debugging
Jan-Thurner Aug 16, 2024
be3ca56
debugging
Jan-Thurner Aug 16, 2024
375d4e6
remove debugging outputs
Jan-Thurner Aug 16, 2024
77e04b7
feedback Flo
Jan-Thurner Aug 17, 2024
cdc234a
caching for node is not supported
Jan-Thurner Aug 17, 2024
a5f7bbc
CodeRabbit
Jan-Thurner Aug 17, 2024
ca3de0c
spotless
Jan-Thurner Aug 17, 2024
5569b31
enhance javadoc
Jan-Thurner Aug 17, 2024
5ba0034
Update supporting_scripts/analysis-of-endpoint-connections/src/main/j…
Jan-Thurner Aug 17, 2024
5acf1a5
fix codeReview artifact
Jan-Thurner Aug 17, 2024
a760d1f
codeReview Johannes
Jan-Thurner Aug 17, 2024
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
79 changes: 53 additions & 26 deletions .github/workflows/analysis-of-endpoint-connections.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Analysis of Endpoint Connections

on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
paths:
- 'src/main/java/**'
- 'src/main/webapp/**'
push:
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved

# Keep in sync with build.yml and test.yml and codeql-analysis.yml
env:
Expand All @@ -15,7 +11,7 @@ env:
java: 21

jobs:
analysis-of-endpoint-connections:
Parse-rest-calls-and-endpoints:
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
Expand All @@ -24,39 +20,70 @@ jobs:
with:
fetch-depth: 0

- name: Get list of modified files
run: |
git diff --name-only origin/${{ github.event.pull_request.base.ref }} HEAD > modified_files.txt
- name: Set up JDK 21
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/setup-java@v4
with:
java-version: '${{ env.java }}'
distribution: 'temurin'
cache: 'gradle'

# Analyze the client sided REST-API calls
- name: Set up Node.js
- name: Set up node.js
uses: actions/setup-node@v4
with:
node-version: '${{ env.node }}'
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved

- name: Install and compile TypeScript
- name: Parse client sided REST-API calls
run: |
cd supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/
npm install
tsc -p tsconfig.analysisOfEndpointConnections.json
- name: Run analysis-of-endpoint-connections-client
run: |
tsc -p supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/tsconfig.analysisOfEndpointConnections.json
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved
node supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.js
- name: Upload JSON file
- name: Parse server sided Endpoints
run: ./gradlew :supporting_scripts:analysis-of-endpoint-connections:runEndpointParser
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload parsing results
uses: actions/upload-artifact@v4
with:
name: rest-calls-json
path: supporting_scripts/analysis-of-endpoint-connections/restCalls.json
name: REST API Parsing Results
path: |
supporting_scripts/analysis-of-endpoint-connections/endpoints.json
supporting_scripts/analysis-of-endpoint-connections/restCalls.json
Analysis-of-endpoint-connections:
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved
needs: Parse-rest-calls-and-endpoints
timeout-minutes: 10
runs-on: ubuntu-latest
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

# Analyze the server sided endpoints
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '${{ env.java }}'
cache: 'gradle'

- name: Run analysis-of-endpoint-connections
run: |
./gradlew :supporting_scripts:analysis-of-endpoint-connections:run --args="$(cat modified_files.txt)"
- name: Download JSON files
uses: actions/download-artifact@v4
with:
name: REST API Parsing Results
path: supporting_scripts/analysis-of-endpoint-connections/

- name: Analyze endpoints
run:
./gradlew :supporting_scripts:analysis-of-endpoint-connections:runEndpointAnalysis

Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved
- name: Analyze rest calls
run:
./gradlew :supporting_scripts:analysis-of-endpoint-connections:runRestCallAnalysis
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload analysis results
uses: actions/upload-artifact@v4
with:
name: Endpoint and REST Call Analysis Results
path: |
supporting_scripts/analysis-of-endpoint-connections/endpointAnalysisResult.json
supporting_scripts/analysis-of-endpoint-connections/restCallAnalysisResult.json
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pluginManagement {

rootProject.name = 'Artemis'

// needed for rest call and endpoint analysis
include 'supporting_scripts:analysis-of-endpoint-connections'

// needed for programming exercise templates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,26 @@ repositories {
evaluationDependsOn(':')

dependencies {
implementation rootProject.ext.qDoxVersionReusable
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.26.0'
implementation 'com.github.javaparser:javaparser-core:3.26.0'
implementation 'com.github.javaparser:javaparser-core-serialization:3.26.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.0'
implementation rootProject.ext.springBootStarterWeb
implementation 'org.slf4j:slf4j-api:1.7.32'
implementation 'ch.qos.logback:logback-classic:1.2.6'
}

test {
useJUnitPlatform()
task runEndpointParser(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass = 'de.tum.cit.endpointanalysis.EndpointParser'
}

application {
mainClassName = 'de.tum.cit.endpointanalysis.AnalysisOfEndpointConnections'
task runEndpointAnalysis(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass = 'de.tum.cit.endpointanalysis.EndpointAnalyzer'
}

run {
if (project.hasProperty('appArgs')) {
args = project.appArgs.split(' ')
}
task runRestCallAnalysis(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass = 'de.tum.cit.endpointanalysis.RestCallAnalyzer'
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,5 @@
"jsx": true
}
},
"rules": {},
"settings": {
"react": {
"version": "detect"
}
}
"rules": {}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package de.tum.cit.endpointanalysis;

import java.util.List;

public record EndpointAnalysis(List<UsedEndpoints> usedEndpoints, List<EndpointInformation> unusedEndpoints) {
Jan-Thurner marked this conversation as resolved.
Show resolved Hide resolved
}
Loading
Loading