Skip to content

Commit 994be03

Browse files
authored
Merge pull request #67 from thc202/release-v0.5.1
Update dependency and release v0.5.1
2 parents 4944b45 + eea886a commit 994be03

File tree

5 files changed

+23
-15
lines changed

5 files changed

+23
-15
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ All notable changes to this GitHub action will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

6-
## [Unreleased]
6+
## [0.5.1] - 2023-07-05
7+
### Fixed
8+
- Check issues with authenticated user. [#66](https://github.com/zaproxy/action-full-scan/issues/66)
79

810
## [0.5.0] - 2023-06-29
911

@@ -40,7 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4042

4143
First release to Marketplace.
4244

43-
[Unreleased]: https://github.com/zaproxy/action-api-scan/compare/v0.5.0...HEAD
45+
[0.5.1]: https://github.com/zaproxy/action-full-scan/compare/v0.5.0...v0.5.1
4446
[0.5.0]: https://github.com/zaproxy/action-full-scan/compare/v0.4.0...v0.5.0
4547
[0.4.0]: https://github.com/zaproxy/action-full-scan/compare/v0.3.0...v0.4.0
4648
[0.3.0]: https://github.com/zaproxy/action-full-scan/compare/v0.2.0...v0.3.0

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if it identifies any alerts. Set this option to `true` if you want to fail the s
6464
```
6565
steps:
6666
- name: ZAP Scan
67-
uses: zaproxy/action-full-scan@v0.5.0
67+
uses: zaproxy/action-full-scan@v0.5.1
6868
with:
6969
target: 'https://www.zaproxy.org/'
7070
```
@@ -84,7 +84,7 @@ jobs:
8484
with:
8585
ref: master
8686
- name: ZAP Scan
87-
uses: zaproxy/action-full-scan@v0.5.0
87+
uses: zaproxy/action-full-scan@v0.5.1
8888
with:
8989
token: ${{ secrets.GITHUB_TOKEN }}
9090
docker_name: 'owasp/zap2docker-stable'

dist/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8081,11 +8081,17 @@ const actionCommon = {
80818081
create_new_issue = true;
80828082
}
80838083
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+
}
80848091
// Sometimes search API returns recently closed issue as an open issue
80858092
for (let i = 0; i < issues.data.items.length; i++) {
80868093
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) {
80898095
openIssue = issue;
80908096
break;
80918097
}
@@ -8108,7 +8114,7 @@ const actionCommon = {
81088114
let lastBotComment;
81098115
const lastCommentIndex = comments["data"].length - 1;
81108116
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) {
81128118
lastBotComment = comments["data"][i];
81138119
break;
81148120
}

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"dependencies": {
2424
"@actions/core": "^1.10.0",
2525
"@actions/exec": "^1.1.1",
26-
"@zaproxy/actions-common-scans": "^1.0.0",
26+
"@zaproxy/actions-common-scans": "^1.0.2",
2727
"lodash": "^4.17.21"
2828
},
2929
"devDependencies": {

0 commit comments

Comments
 (0)