Skip to content

Commit

Permalink
Slim down marker report issue template rendering (localstack#9144)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikschubert authored Sep 14, 2023
1 parent fa10d1d commit 485f9f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/bot_templates/MARKER_REPORT_ISSUE.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ _Note_: The individual assignments here are based on the entries in the [CODEOWN
## unknown ({{ data.aggregated['aws_unknown'] }})

{% for item in data.owners_aws_unknown -%}
- [ ] `{{ item.pytest_node_id }}` ([file]({{ item.file_url }})) {{ " ".join(item.owners) }}
- [ ] `{{ item.pytest_node_id }}` {{ " ".join(item.owners) }}
{% endfor %}

## needs_fixing ({{ data.aggregated['aws_needs_fixing'] }})

{% for item in data.owners_aws_needs_fixing -%}
- [ ] `{{ item.pytest_node_id }}` ([file]({{ item.file_url }})) {{ " ".join(item.owners) }}
- [ ] `{{ item.pytest_node_id }}` {{ " ".join(item.owners) }}
{% endfor %}
6 changes: 6 additions & 0 deletions .github/workflows/marker-report-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
# only manual for now
workflow_dispatch:
inputs:
dryRun:
description: 'Execute a Dry-Run? A Dry-Run will not create any issues and only print the issue content in the logs instead'
required: false
type: boolean
default: false
updateExistingIssue:
description: 'Select the empty string "" to open duplicate issues, "true" to update duplicate issues and "false" to skip duplicate issues'
required: false
Expand Down Expand Up @@ -68,6 +73,7 @@ jobs:
path: ./target/MARKER_REPORT_ISSUE.md

- name: Create GH issue from template
if: inputs.dryRun != true
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.PRO_ACCESS_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion scripts/render_marker_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def create_test_entry(entry, *, code_owners: CodeOwners, commit_sha: str, github
return TestEntry(
pytest_node_id=entry["node_id"],
file_path=rel_path,
owners=[o[1] for o in code_owners.of(rel_path)] or ["CODEOWNER_MISSING"],
owners=[o[1] for o in code_owners.of(rel_path)] or ["?"],
file_url=f"https://github.com/{github_repo}/blob/{commit_sha}/{rel_path}",
)

Expand Down

0 comments on commit 485f9f0

Please sign in to comment.