Skip to content

Commit

Permalink
updating header based on product team feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dana-yaish committed Oct 2, 2023
1 parent d5d1155 commit a2b0c6c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion services/notification/notifiers/mixins/message/sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async def do_write_section(self, comparison, diff, changes, links, behind_by=Non
f"Attention: `{misses_and_partials} lines` in your changes are missing coverage. Please review."
)
else:
yield "All modified lines are covered by tests :white_check_mark:"
yield "All modified and coverable lines are covered by tests :white_check_mark:"

hide_project_coverage = self.settings.get("hide_project_coverage", False)
if hide_project_coverage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ async def test_notify_new_layout(
assert result.explanation is None
message = [
"## [Codecov](https://app.codecov.io/gh/joseph-sentry/codecov-demo/pull/9?src=pr&el=h1) Report",
"All modified lines are covered by tests :white_check_mark:",
"All modified and coverable lines are covered by tests :white_check_mark:",
"> Comparison is base [(`5b174c2`)](https://app.codecov.io/gh/joseph-sentry/codecov-demo/commit/5b174c2b40d501a70c479e91025d5109b1ad5c1b?el=desc) 50.00% compared to head [(`5601846`)](https://app.codecov.io/gh/joseph-sentry/codecov-demo/pull/9?src=pr&el=desc) 60.00%.",
"> Report is 2 commits behind head on main.",
"",
Expand Down Expand Up @@ -638,7 +638,7 @@ async def test_notify_with_components(
assert result.explanation is None
message = [
"## [Codecov](https://app.codecov.io/gh/joseph-sentry/codecov-demo/pull/9?src=pr&el=h1) Report",
"All modified lines are covered by tests :white_check_mark:",
"All modified and coverable lines are covered by tests :white_check_mark:",
"> Comparison is base [(`5b174c2`)](https://app.codecov.io/gh/joseph-sentry/codecov-demo/commit/5b174c2b40d501a70c479e91025d5109b1ad5c1b?el=desc) 50.00% compared to head [(`5601846`)](https://app.codecov.io/gh/joseph-sentry/codecov-demo/pull/9?src=pr&el=desc) 60.00%.",
"> Report is 2 commits behind head on main.",
"",
Expand Down
14 changes: 7 additions & 7 deletions services/notification/notifiers/tests/unit/test_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@ async def test_build_message_negative_change_tricky_rounding_newheader(
result = await notifier.build_message(comparison)
expected_result = [
f"## [Codecov](test.example.br/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=h1) Report",
f"All modified lines are covered by tests :white_check_mark:",
f"All modified and coverable lines are covered by tests :white_check_mark:",
f"> Comparison is base [(`{comparison.base.commit.commitid[:7]}`)](test.example.br/gh/{repository.slug}/commit/{comparison.base.commit.commitid}?el=desc) 88.58% compared to head [(`{comparison.head.commit.commitid[:7]}`)](test.example.br/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=desc) 88.54%.",
f"",
]
Expand Down Expand Up @@ -3904,7 +3904,7 @@ async def test_new_header_section_writer(self, mocker, sample_comparison):
)
print(res)
assert res == [
"All modified lines are covered by tests :white_check_mark:",
"All modified and coverable lines are covered by tests :white_check_mark:",
f"> Comparison is base [(`{sample_comparison.base.commit.commitid[:7]}`)](urlurl?el=desc) 0% compared to head [(`{sample_comparison.head.commit.commitid[:7]}`)](urlurl?src=pr&el=desc) 0%.",
]

Expand Down Expand Up @@ -3934,7 +3934,7 @@ async def test_new_header_section_writer_with_behind_by(
)
print(res)
assert res == [
"All modified lines are covered by tests :white_check_mark:",
"All modified and coverable lines are covered by tests :white_check_mark:",
f"> Comparison is base [(`{sample_comparison.base.commit.commitid[:7]}`)](urlurl?el=desc) 0% compared to head [(`{sample_comparison.head.commit.commitid[:7]}`)](urlurl?src=pr&el=desc) 0%.",
"> Report is 3 commits behind head on master.",
]
Expand Down Expand Up @@ -3963,7 +3963,7 @@ async def test_new_header_section_writer_no_project_coverage(
)
)
assert res == [
"All modified lines are covered by tests :white_check_mark:",
"All modified and coverable lines are covered by tests :white_check_mark:",
]


Expand Down Expand Up @@ -4223,7 +4223,7 @@ async def test_create_message_files_section_with_critical_files_new_layout(
repository = sample_comparison.head.commit.repository
expected_result = [
f"## [Codecov](https://app.codecov.io/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=h1) Report",
f"All modified lines are covered by tests :white_check_mark:",
f"All modified and coverable lines are covered by tests :white_check_mark:",
f"> Comparison is base [(`{comparison.base.commit.commitid[:7]}`)](https://app.codecov.io/gh/{repository.slug}/commit/{comparison.base.commit.commitid}?el=desc) 50.00% compared to head [(`{comparison.head.commit.commitid[:7]}`)](https://app.codecov.io/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=desc) 60.00%.",
"",
"Changes have been made to critical files, which contain lines commonly executed in production. [Learn more](https://docs.codecov.com/docs/impact-analysis)",
Expand Down Expand Up @@ -4267,7 +4267,7 @@ async def test_build_message_no_base_commit_new_layout(
result = await notifier.build_message(comparison)
expected_result = [
f"## [Codecov](test.example.br/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=h1) Report",
f"All modified lines are covered by tests :white_check_mark:",
f"All modified and coverable lines are covered by tests :white_check_mark:",
f"> :exclamation: No coverage uploaded for pull request base (`master@cdf9aa4`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).",
f"",
f"[![Impacted file tree graph](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/graphs/tree.svg?width=650&height=150&src=pr&token={repository.image_token})](test.example.br/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=tree)",
Expand Down Expand Up @@ -4587,7 +4587,7 @@ async def test_build_message_no_patch_or_proj_change(
result = await notifier.build_message(comparison)
expected_result = [
f"## [Codecov](test.example.br/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=h1) Report",
f"All modified lines are covered by tests :white_check_mark:",
f"All modified and coverable lines are covered by tests :white_check_mark:",
f"> Comparison is base [(`{comparison.base.commit.commitid[:7]}`)](test.example.br/gh/{repository.slug}/commit/{comparison.base.commit.commitid}?el=desc) 65.38% compared to head [(`{comparison.head.commit.commitid[:7]}`)](test.example.br/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=desc) 65.38%.",
f"",
f"[![Impacted file tree graph](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/graphs/tree.svg?width=650&height=150&src=pr&token={repository.image_token})](test.example.br/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=tree)",
Expand Down

0 comments on commit a2b0c6c

Please sign in to comment.