Skip to content

Commit

Permalink
chore: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ideepu committed Apr 5, 2024
1 parent ccdacc1 commit b50a22f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ lint:
test:
pipenv run pytest tests/* --cov

build:
python3 -m build

publish:
python3 -m twine upload dist/*

run:
pipenv run python run.py

Expand Down
1 change: 1 addition & 0 deletions codecov/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def process_pr( # pylint: disable=too-many-locals
marker=marker,
subproject_id=config.SUBPROJECT_ID,
complete_project_report=config.COMPLETE_PROJECT_REPORT,
coverage_report_url=config.COVERAGE_REPORT_URL,
)
except template.MissingMarker:
log.error(
Expand Down
1 change: 1 addition & 0 deletions codecov/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Config:
ANNOTATION_TYPE: str = 'warning'
MAX_FILES_IN_COMMENT: int = 25
COMPLETE_PROJECT_REPORT: bool = False
COVERAGE_REPORT_URL: str | None = None
# Only for debugging, not exposed in the action
DEBUG: bool = False

Expand Down
2 changes: 2 additions & 0 deletions codecov/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def get_comment_markdown( # pylint: disable=too-many-arguments,too-many-locals
marker: str,
subproject_id: str | None = None,
complete_project_report: bool = False,
coverage_report_url: str | None = None,
):
loader = CommentLoader(base_template=base_template)
env = SandboxedEnvironment(loader=loader)
Expand Down Expand Up @@ -155,6 +156,7 @@ def get_comment_markdown( # pylint: disable=too-many-arguments,too-many-locals
subproject_id=subproject_id,
marker=marker,
complete_project_report=complete_project_report,
coverage_report_url=coverage_report_url,
)
except jinja2.exceptions.TemplateError as exc:
raise TemplateError from exc
Expand Down
5 changes: 5 additions & 0 deletions codecov/template_files/comment.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -332,4 +332,9 @@ This report was generated by <a href="{%- if subproject_id %}{{ subproject_id }}
{%- endif -%}
{%- endblock project_coverage_by_file %}

{%- block full_coverage_report -%}
{%- if coverage_report_url %}
### See the full coverage report of the project <a href="{{ coverage_report_url }}">.
{%- endif -%}
{%- endblock full_coverage_report %}
{{ marker -}}

0 comments on commit b50a22f

Please sign in to comment.