File tree Expand file tree Collapse file tree 5 files changed +23
-15
lines changed Expand file tree Collapse file tree 5 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ All notable changes to this GitHub action will be documented in this file.
4
4
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) .
6
6
7
- ## [ Unreleased]
7
+ ## [ 0.3.1] - 2023-07-05
8
+ ### Fixed
9
+ - Check issues with authenticated user. [ #19 ] ( https://github.com/zaproxy/action-api-scan/issues/19 )
8
10
9
11
## [ 0.3.0] - 2023-06-29
10
12
@@ -26,7 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
26
28
27
29
First release to Marketplace.
28
30
29
- [ Unreleased ] : https://github.com/zaproxy/action-api-scan/compare/v0.3.0...HEAD
31
+ [ 0.3.1 ] : https://github.com/zaproxy/action-api-scan/compare/v0.3.0...v0.3.1
30
32
[ 0.3.0 ] : https://github.com/zaproxy/action-api-scan/compare/v0.2.0...v0.3.0
31
33
[ 0.2.0 ] : https://github.com/zaproxy/action-api-scan/compare/v0.1.1...v0.2.0
32
34
[ 0.1.1 ] : https://github.com/zaproxy/action-api-scan/compare/v0.1.0...v0.1.1
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ will be copied into the docker container:
73
73
```
74
74
steps:
75
75
- name: ZAP Scan
76
- uses: zaproxy/action-api-scan@v0.3.0
76
+ uses: zaproxy/action-api-scan@v0.3.1
77
77
with:
78
78
target: 'https://www.zaproxy.org/'
79
79
```
94
94
ref: master
95
95
96
96
- name: ZAP Scan
97
- uses: zaproxy/action-api-scan@v0.3.0
97
+ uses: zaproxy/action-api-scan@v0.3.1
98
98
with:
99
99
token: ${{ secrets.GITHUB_TOKEN }}
100
100
docker_name: 'owasp/zap2docker-stable'
Original file line number Diff line number Diff line change @@ -8081,11 +8081,17 @@ const actionCommon = {
8081
8081
create_new_issue = true;
8082
8082
}
8083
8083
else {
8084
+ let login = "github-actions[bot]";
8085
+ try {
8086
+ login = (await octokit.users.getAuthenticated()).data.login;
8087
+ }
8088
+ catch (e) {
8089
+ console.log(`Using ${login} to serch for issues.`);
8090
+ }
8084
8091
// Sometimes search API returns recently closed issue as an open issue
8085
8092
for (let i = 0; i < issues.data.items.length; i++) {
8086
8093
const issue = issues.data.items[i];
8087
- if (issue["state"] === "open" &&
8088
- issue["user"]["login"] === "github-actions[bot]") {
8094
+ if (issue["state"] === "open" && issue["user"]["login"] === login) {
8089
8095
openIssue = issue;
8090
8096
break;
8091
8097
}
@@ -8108,7 +8114,7 @@ const actionCommon = {
8108
8114
let lastBotComment;
8109
8115
const lastCommentIndex = comments["data"].length - 1;
8110
8116
for (let i = lastCommentIndex; i >= 0; i--) {
8111
- if (comments["data"][i]["user"]["login"] === "github-actions[bot]" ) {
8117
+ if (comments["data"][i]["user"]["login"] === login ) {
8112
8118
lastBotComment = comments["data"][i];
8113
8119
break;
8114
8120
}
Original file line number Diff line number Diff line change 23
23
"dependencies" : {
24
24
"@actions/core" : " ^1.10.0" ,
25
25
"@actions/exec" : " ^1.1.1" ,
26
- "@zaproxy/actions-common-scans" : " ^1.0.0 " ,
26
+ "@zaproxy/actions-common-scans" : " ^1.0.2 " ,
27
27
"lodash" : " ^4.17.21"
28
28
},
29
29
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments