Skip to content

Commit

Permalink
Merge pull request #67 from thc202/release-v0.5.1
Browse files Browse the repository at this point in the history
Update dependency and release v0.5.1
  • Loading branch information
kingthorin authored Jul 5, 2023
2 parents 4944b45 + eea886a commit 994be03
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ All notable changes to this GitHub action will be documented in this file.

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

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

## [0.5.0] - 2023-06-29

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

First release to Marketplace.

[Unreleased]: https://github.com/zaproxy/action-api-scan/compare/v0.5.0...HEAD
[0.5.1]: https://github.com/zaproxy/action-full-scan/compare/v0.5.0...v0.5.1
[0.5.0]: https://github.com/zaproxy/action-full-scan/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/zaproxy/action-full-scan/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/zaproxy/action-full-scan/compare/v0.2.0...v0.3.0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if it identifies any alerts. Set this option to `true` if you want to fail the s
```
steps:
- name: ZAP Scan
uses: zaproxy/[email protected].0
uses: zaproxy/[email protected].1
with:
target: 'https://www.zaproxy.org/'
```
Expand All @@ -84,7 +84,7 @@ jobs:
with:
ref: master
- name: ZAP Scan
uses: zaproxy/[email protected].0
uses: zaproxy/[email protected].1
with:
token: ${{ secrets.GITHUB_TOKEN }}
docker_name: 'owasp/zap2docker-stable'
Expand Down
12 changes: 9 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8081,11 +8081,17 @@ const actionCommon = {
create_new_issue = true;
}
else {
let login = "github-actions[bot]";
try {
login = (await octokit.users.getAuthenticated()).data.login;
}
catch (e) {
console.log(`Using ${login} to serch for issues.`);
}
// Sometimes search API returns recently closed issue as an open issue
for (let i = 0; i < issues.data.items.length; i++) {
const issue = issues.data.items[i];
if (issue["state"] === "open" &&
issue["user"]["login"] === "github-actions[bot]") {
if (issue["state"] === "open" && issue["user"]["login"] === login) {
openIssue = issue;
break;
}
Expand All @@ -8108,7 +8114,7 @@ const actionCommon = {
let lastBotComment;
const lastCommentIndex = comments["data"].length - 1;
for (let i = lastCommentIndex; i >= 0; i--) {
if (comments["data"][i]["user"]["login"] === "github-actions[bot]") {
if (comments["data"][i]["user"]["login"] === login) {
lastBotComment = comments["data"][i];
break;
}
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@zaproxy/actions-common-scans": "^1.0.0",
"@zaproxy/actions-common-scans": "^1.0.2",
"lodash": "^4.17.21"
},
"devDependencies": {
Expand Down

0 comments on commit 994be03

Please sign in to comment.