Skip to content

Commit 4d2fe44

Browse files
authored
Merge pull request #13422 from DefectDojo/master-into-dev/2.51.1-2.52.0-dev
Release: Merge back 2.51.1 into dev from: master-into-dev/2.51.1-2.52.0-dev
2 parents f61e3aa + e650c0f commit 4d2fe44

34 files changed

+4800
-120
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Update HELM docs for Renovate & Dependabot
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- dev
8+
- bugfix
9+
- release/**
10+
- hotfix/**
11+
12+
jobs:
13+
docs_updates:
14+
name: Update documentation
15+
runs-on: ubuntu-latest
16+
if: startsWith(github.head_ref, 'renovate/') or startsWith(github.head_ref, 'dependabot/')
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
21+
- name: Run helm-docs
22+
uses: losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2
23+
with:
24+
chart-search-root: "helm/defectdojo"
25+
git-push: true

.github/workflows/release-nightly-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
schedule:
99
# every day at 5:00 UTC
1010
# in this case inputs are all null/empty, hence the default values are used below
11-
- cron: "* 5 * * *"
11+
- cron: "0 5 * * *"
1212
workflow_dispatch:
1313

1414
jobs:

.github/workflows/release-x-manual-helm-chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,5 @@ jobs:
117117
fi
118118
cp -f ./build/index.yaml ./index.yaml
119119
git add ./index.yaml
120-
git commit -m "Update index.yaml"
120+
git commit -m "Update index.yaml - ${{ inputs.release_number }}"
121121
git push -u origin helm-charts

.github/workflows/test-helm-chart.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
- name: Set up chart-testing
3535
uses: helm/chart-testing-action@0d28d3144d3a25ea2cc349d6e59901c4ff469b3b # v2.7.0
3636
with:
37-
yamale_version: 4.0.4
38-
yamllint_version: 1.35.1
37+
yamale_version: 6.0.0
38+
yamllint_version: 1.37.1
3939

4040
- name: Determine target branch
4141
id: ct-branch-target
@@ -78,12 +78,16 @@ jobs:
7878
7979
# Get current branch annotation
8080
current_annotation=$(yq e '.annotations."artifacthub.io/changes"' "helm/defectdojo/Chart.yaml")
81+
echo "Current annotation: "
82+
echo $current_annotation
8183
8284
# Get target branch version of Chart.yaml annotation
8385
target_annotation=$(git show "origin/${{ env.ct-branch }}:helm/defectdojo/Chart.yaml" | yq e '.annotations."artifacthub.io/changes"' -)
86+
echo "Target annotation: "
87+
echo $target_annotation
8488
8589
if [[ "$current_annotation" == "$target_annotation" ]]; then
86-
echo "::error::The HELM chart has been updated but the 'artifacthub.io/changes' annotation in 'Chart.yaml' has not been changed (compared to '${{ env.ct-branch }}' branch)"
90+
echo "::error file=helm/defectdojo/Chart.yaml::The 'artifacthub.io/changes' annotation has not been updated compared to ${{ env.ct-branch }}. For more, check the hint in 'helm/defectdojo/Chart.yaml'"
8791
exit 1
8892
fi
8993

docs/content/en/api/api-v2-docs.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ DefectDojo\'s API is created using [Django Rest
99
Framework](http://www.django-rest-framework.org/). The documentation of
1010
each endpoint is available within each DefectDojo installation at
1111
[`/api/v2/oa3/swagger-ui`](https://demo.defectdojo.org/api/v2/oa3/swagger-ui/) and can be accessed by choosing the API v2
12-
Docs link on the user drop down menu in the header.
12+
Docs link on the user drop down menu in the header.
1313

1414
![image](images/api_v2_1.png)
1515

@@ -155,7 +155,6 @@ Example for importing a scan result:
155155
tags:test
156156
scan_type:ZAP Scan
157157
minimum_severity:Info
158-
skip_duplicates:true
159158
close_old_findings:false
160159

161160
- Body tab

dojo/jira_link/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ def post(self, request):
327327
return render(request, self.get_template(), {"jform": jform})
328328
# authentication successful
329329
# Get the open and close keys
330+
msg = "Unable to find Open/Close ID's (invalid issue key specified?). They will need to be found manually"
330331
try:
331332
issue_id = jform.cleaned_data.get("issue_key")
332333
key_url = jira_server.strip("/") + "/rest/api/latest/issue/" + issue_id + "/transitions?expand=transitions.fields"
@@ -339,8 +340,9 @@ def post(self, request):
339340
if node["to"]["statusCategory"]["name"] == "Done":
340341
close_key = close_key or int(node["id"])
341342
except Exception:
342-
msg = "Unable to find Open/Close ID's (invalid issue key specified?). They will need to be found manually"
343343
logger.exception(msg) # already logged in jira_helper
344+
345+
if not open_key or not close_key:
344346
messages.add_message(
345347
request,
346348
messages.ERROR,

0 commit comments

Comments
 (0)