diff --git a/codecov/config.py b/codecov/config.py index 4011c11..9795f73 100644 --- a/codecov/config.py +++ b/codecov/config.py @@ -51,6 +51,7 @@ class Config: SKIP_COVERED_FILES_IN_REPORT: bool = True COMPLETE_PROJECT_REPORT: bool = False COVERAGE_REPORT_URL: str | None = None + LABEL: str | None = None DEBUG: bool = False def __post_init__(self) -> None: diff --git a/codecov/main.py b/codecov/main.py index 0f7a1b2..dd734e7 100644 --- a/codecov/main.py +++ b/codecov/main.py @@ -101,6 +101,7 @@ def _create_comment(self) -> None: count_files=diff_count_files, coverage_files=coverage_files_info, count_coverage_files=count_coverage_files, + label=self.config.LABEL, ) except MissingMarker as e: log.error( diff --git a/codecov/template_files/comment.md.j2 b/codecov/template_files/comment.md.j2 index 8d528ab..d6af8c4 100644 --- a/codecov/template_files/comment.md.j2 +++ b/codecov/template_files/comment.md.j2 @@ -39,8 +39,10 @@ {%- endblock full_coverage_report_link %} {%- block footer %} +{% if label %} - This report was generated by codecov + This report was generated by {{ label }} +{% endif %} {% endblock footer -%} {{ marker -}}