diff --git a/services/notification/notifiers/mixins/message/sections.py b/services/notification/notifiers/mixins/message/sections.py index ae00df2a8..22ffde27f 100644 --- a/services/notification/notifiers/mixins/message/sections.py +++ b/services/notification/notifiers/mixins/message/sections.py @@ -629,7 +629,10 @@ async def do_write_section(self, comparison, diff, changes, links, behind_by=Non + ("---|" if has_carriedforward_flags else "") ) - yield ("| Flag " + table_header) + yield ( + "| [Flag]({href}/flags?src=pr&el=flags) ".format(href=links["pull"]) + + table_header + ) yield (table_layout) for flag in sorted(flags, key=lambda f: f["name"]): carriedforward, carriedforward_from = ( @@ -661,7 +664,10 @@ async def do_write_section(self, comparison, diff, changes, links, behind_by=Non yield ( "| {name} {metrics}{cf}".format( - name=flag["name"], + name="[{flag_name}]({href}/flags?src=pr&el=flag)".format( + flag_name=flag["name"], + href=links["pull"], + ), metrics=make_metrics( flag["before"], flag["after"], @@ -722,13 +728,18 @@ async def do_write_section( ) # Table header and layout - yield "| Components | Coverage \u0394 | |" + yield "| [Components]({href}/components?src=pr&el=components) | Coverage \u0394 | |".format( + href=links["pull"], + ) yield "|---|---|---|" # The interesting part for component_data in component_data_to_show: yield ( "| {name} {metrics}".format( - name=component_data["name"], + name="[{component_name}]({href}/components?src=pr&el=component)".format( + component_name=component_data["name"], + href=links["pull"], + ), metrics=make_metrics( component_data["before"], component_data["after"], diff --git a/services/notification/notifiers/tests/integration/test_comment.py b/services/notification/notifiers/tests/integration/test_comment.py index 91a38baa2..db265a0a9 100644 --- a/services/notification/notifiers/tests/integration/test_comment.py +++ b/services/notification/notifiers/tests/integration/test_comment.py @@ -364,10 +364,10 @@ async def test_notify(self, sample_comparison, codecov_vcr, mock_configuration): "- Partials 0 1 +1 ", "```", "", - "| Flag | Coverage Δ | Complexity Δ | |", + "| [Flag](https://app.codecov.io/gh/ThiagoCodecov/example-python/pull/15/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", "|---|---|---|---|", - "| integration | `?` | `?` | |", - "| unit | `100.00% <ø> (?)` | `0.00 <ø> (?)` | |", + "| [integration](https://app.codecov.io/gh/ThiagoCodecov/example-python/pull/15/flags?src=pr&el=flag) | `?` | `?` | |", + "| [unit](https://app.codecov.io/gh/ThiagoCodecov/example-python/pull/15/flags?src=pr&el=flag) | `100.00% <ø> (?)` | `0.00 <ø> (?)` | |", "", "Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", "", @@ -431,7 +431,7 @@ async def test_notify_upload_limited( ): mock_configuration._params["setup"] = { "codecov_url": None, - "codecov_dashboard_url": "test.example.br", + "codecov_dashboard_url": "https://app.codecov.io", } comparison = sample_comparison_for_limited_upload notifier = CommentNotifier( @@ -447,10 +447,10 @@ async def test_notify_upload_limited( assert result.notification_successful assert result.explanation is None expected_message = [ - f"## [Codecov](test.example.br/plan/gh/test-acc9) upload limit reached :warning:", + f"## [Codecov](https://app.codecov.io/plan/gh/test-acc9) upload limit reached :warning:", f"This org is currently on the free Basic Plan; which includes 250 free private repo uploads each rolling month.\ This limit has been reached and additional reports cannot be generated. For unlimited uploads,\ - upgrade to our [pro plan](test.example.br/plan/gh/test-acc9).", + upgrade to our [pro plan](https://app.codecov.io/plan/gh/test-acc9).", f"", f"**Do you have questions or need help?** Connect with our sales team today at ` sales@codecov.io `", ] @@ -507,10 +507,10 @@ async def test_notify_gitlab( "- Partials 0 1 +1 ", "```", "", - "| Flag | Coverage Δ | Complexity Δ | |", + "| [Flag](https://app.codecov.io/gl/joseph-sentry/example-python/pull/1/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", "|---|---|---|---|", - "| integration | `?` | `?` | |", - "| unit | `100.00% <ø> (?)` | `0.00 <ø> (?)` | |", + "| [integration](https://app.codecov.io/gl/joseph-sentry/example-python/pull/1/flags?src=pr&el=flag) | `?` | `?` | |", + "| [unit](https://app.codecov.io/gl/joseph-sentry/example-python/pull/1/flags?src=pr&el=flag) | `100.00% <ø> (?)` | `0.00 <ø> (?)` | |", "", "Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", "", @@ -578,10 +578,10 @@ async def test_notify_new_layout( "- Partials 0 1 +1 ", "```", "", - "| Flag | Coverage Δ | Complexity Δ | |", + "| [Flag](https://app.codecov.io/gh/ThiagoCodecov/example-python/pull/15/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", "|---|---|---|---|", - "| integration | `?` | `?` | |", - "| unit | `100.00% <ø> (?)` | `0.00 <ø> (?)` | |", + "| [integration](https://app.codecov.io/gh/ThiagoCodecov/example-python/pull/15/flags?src=pr&el=flag) | `?` | `?` | |", + "| [unit](https://app.codecov.io/gh/ThiagoCodecov/example-python/pull/15/flags?src=pr&el=flag) | `100.00% <ø> (?)` | `0.00 <ø> (?)` | |", "", "Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", "", @@ -653,18 +653,18 @@ async def test_notify_with_components( "- Partials 0 1 +1 ", "```", "", - "| Flag | Coverage Δ | Complexity Δ | |", + "| [Flag](https://app.codecov.io/gh/codecove2e/example-python/pull/4/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", "|---|---|---|---|", - "| integration | `?` | `?` | |", - "| unit | `100.00% <ø> (?)` | `0.00 <ø> (?)` | |", + "| [integration](https://app.codecov.io/gh/codecove2e/example-python/pull/4/flags?src=pr&el=flag) | `?` | `?` | |", + "| [unit](https://app.codecov.io/gh/codecove2e/example-python/pull/4/flags?src=pr&el=flag) | `100.00% <ø> (?)` | `0.00 <ø> (?)` | |", "", "Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", "", "[see 2 files with indirect coverage changes](https://app.codecov.io/gh/codecove2e/example-python/pull/4/indirect-changes?src=pr&el=tree-more)", "", - "| Components | Coverage Δ | |", + "| [Components](https://app.codecov.io/gh/codecove2e/example-python/pull/4/components?src=pr&el=components) | Coverage Δ | |", "|---|---|---|", - "| go_files | `62.50% <ø> (+12.50%)` | :arrow_up: |", + "| [go_files](https://app.codecov.io/gh/codecove2e/example-python/pull/4/components?src=pr&el=component) | `62.50% <ø> (+12.50%)` | :arrow_up: |", "", "", "", diff --git a/services/notification/notifiers/tests/unit/test_comment.py b/services/notification/notifiers/tests/unit/test_comment.py index f4038dd8d..d95618a81 100644 --- a/services/notification/notifiers/tests/unit/test_comment.py +++ b/services/notification/notifiers/tests/unit/test_comment.py @@ -909,10 +909,10 @@ async def test_build_message( f"- Partials 0 1 +1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| integration | `?` | `?` | |", - f"| unit | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", + f"| [integration](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `?` | `?` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -965,16 +965,16 @@ async def test_build_message_flags_empty_coverage( f"> Merging [#{pull.pullid}](test.example.br/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=desc) ({comparison.head.commit.commitid[:7]}) into [master](test.example.br/gh/{repository.slug}/commit/{comparison.base.commit.commitid}?el=desc) ({comparison.base.commit.commitid[:7]}) will **not change** coverage.", f"> The diff coverage is `n/a`.", f"", - "| Flag | Coverage Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | |", "|---|---|---|", - "| eighth | `?` | |", - "| fifth | `∅ <ø> (?)` | |", - "| first | `100.00% <ø> (ø)` | |", - "| fourth | `∅ <ø> (∅)` | |", - "| second | `50.00% <ø> (∅)` | |", - "| seventh | `?` | |", - "| sixth | `100.00% <ø> (?)` | |", - "| third | `∅ <ø> (∅)` | |", + f"| [eighth](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `?` | |", + f"| [fifth](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `∅ <ø> (?)` | |", + f"| [first](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <ø> (ø)` | |", + f"| [fourth](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `∅ <ø> (∅)` | |", + f"| [second](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `50.00% <ø> (∅)` | |", + f"| [seventh](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `?` | |", + f"| [sixth](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <ø> (?)` | |", + f"| [third](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `∅ <ø> (∅)` | |", "", "Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", "", @@ -1036,10 +1036,10 @@ async def test_build_message_more_sections( f"- Partials 0 1 +1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| integration | `?` | `?` | |", - f"| unit | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", + f"| [integration](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `?` | `?` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -1301,10 +1301,10 @@ async def test_build_message_hide_complexity( f"- Partials 0 1 +1 ", f"```", f"", - f"| Flag | Coverage Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | |", f"|---|---|---|", - f"| integration | `?` | |", - f"| unit | `100.00% <100.00%> (?)` | |", + f"| [integration](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `?` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <100.00%> (?)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -1375,9 +1375,9 @@ async def test_build_message_no_base_report( f" Partials ? 1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| unit | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -1446,9 +1446,9 @@ async def test_build_message_no_base_commit( f" Partials ? 1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| unit | `100.00% <0.00%> (?)` | `0.00% <0.00%> (?%)` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <0.00%> (?)` | `0.00% <0.00%> (?%)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -1516,9 +1516,9 @@ async def test_build_message_no_change( f" Partials 1 1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| unit | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -1591,10 +1591,10 @@ async def test_build_message_negative_change( f"+ Partials 1 0 -1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| integration | `100.00% <ø> (?)` | `0.00 <ø> (?)` | |", - f"| unit | `?` | `?` | |", + f"| [integration](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <ø> (?)` | `0.00 <ø> (?)` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `?` | `?` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -1786,10 +1786,10 @@ async def test_build_message_show_carriedforward_flags_no_cf_coverage( f"- Partials 0 1 +1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| integration | `?` | `?` | |", - f"| unit | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", + f"| [integration](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `?` | `?` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", f"", f"| [Files Changed](test.example.br/gh/{repository.slug}/pull/{pull.pullid}?src=pr&el=tree) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", @@ -1920,11 +1920,11 @@ async def test_build_message_with_without_flags( f" Partials 68 68 ", f"```", f"", - f"| Flag | Coverage Δ | | *Carryforward flag |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | | *Carryforward flag |", f"|---|---|---|---|", - f"| enterprise | `25.00% <ø> (ø)` | | Carriedforward from [1234567](test.example.br/gh/{repository.slug}/commit/123456789sha) |", - f"| integration | `25.00% <ø> (ø)` | | Carriedforward |", - f"| unit | `25.00% <ø> (ø)` | | |", + f"| [enterprise](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `25.00% <ø> (ø)` | | Carriedforward from [1234567](test.example.br/gh/{repository.slug}/commit/123456789sha) |", + f"| [integration](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `25.00% <ø> (ø)` | | Carriedforward |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `25.00% <ø> (ø)` | | |", f"", f"*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags) to find out more." f"", @@ -1996,11 +1996,11 @@ async def test_build_message_show_carriedforward_flags_has_cf_coverage( f" Partials 68 68 ", f"```", f"", - f"| Flag | Coverage Δ | | *Carryforward flag |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | | *Carryforward flag |", f"|---|---|---|---|", - f"| enterprise | `25.00% <ø> (ø)` | | Carriedforward from [1234567](test.example.br/gh/{repository.slug}/commit/123456789sha) |", - f"| integration | `25.00% <ø> (ø)` | | Carriedforward |", - f"| unit | `25.00% <ø> (ø)` | | |", + f"| [enterprise](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `25.00% <ø> (ø)` | | Carriedforward from [1234567](test.example.br/gh/{repository.slug}/commit/123456789sha) |", + f"| [integration](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `25.00% <ø> (ø)` | | Carriedforward |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `25.00% <ø> (ø)` | | |", f"", f"*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags) to find out more." f"", @@ -2072,9 +2072,9 @@ async def test_build_message_hide_carriedforward_flags_has_cf_coverage( f" Partials 68 68 ", f"```", f"", - f"| Flag | Coverage Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | |", f"|---|---|---|", - f"| unit | `25.00% <ø> (ø)` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `25.00% <ø> (ø)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more." f"", @@ -2175,9 +2175,9 @@ async def test_build_message_no_flags( f"- Partials 0 1 +1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| integration | `?` | `?` | |", + f"| [integration](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `?` | `?` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -4049,9 +4049,9 @@ async def test_build_message_no_base_commit_new_layout( f" Partials ? 1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| unit | `100.00% <0.00%> (?)` | `0.00% <0.00%> (?%)` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <0.00%> (?)` | `0.00% <0.00%> (?%)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -4115,9 +4115,9 @@ async def test_build_message_no_base_report_new_layout( f" Partials ? 1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| unit | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -4227,10 +4227,10 @@ async def test_build_message_head_and_pull_head_differ_new_layout( f"- Partials 0 1 +1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| integration | `?` | `?` | |", - f"| unit | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", + f"| [integration](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `?` | `?` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", @@ -4302,17 +4302,17 @@ async def test_build_message_head_and_pull_head_differ_with_components( f"- Partials 0 1 +1 ", f"```", f"", - f"| Flag | Coverage Δ | Complexity Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | Complexity Δ | |", f"|---|---|---|---|", - f"| integration | `?` | `?` | |", - f"| unit | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", + f"| [integration](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `?` | `?` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `100.00% <100.00%> (?)` | `0.00 <0.00> (?)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.", f"", - f"| Components | Coverage Δ | |", + f"| [Components](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/components?src=pr&el=components) | Coverage Δ | |", f"|---|---|---|", - f"| go_files | `62.50% <66.67%> (+12.50%)` | :arrow_up: |", - f"| unit_flags | `100.00% <100.00%> (∅)` | |", + f"| [go_files](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/components?src=pr&el=component) | `62.50% <66.67%> (+12.50%)` | :arrow_up: |", + f"| [unit_flags](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/components?src=pr&el=component) | `100.00% <100.00%> (∅)` | |", f"", f"", f"", @@ -4367,9 +4367,9 @@ async def test_build_message_no_patch_or_proj_change( f" Partials 68 68 ", f"```", f"", - f"| Flag | Coverage Δ | |", + f"| [Flag](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flags) | Coverage Δ | |", f"|---|---|---|", - f"| unit | `25.00% <ø> (ø)` | |", + f"| [unit](test.example.br/gh/{repository.slug}/pull/{pull.pullid}/flags?src=pr&el=flag) | `25.00% <ø> (ø)` | |", f"", f"Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more." f"", @@ -4649,10 +4649,10 @@ async def test_write_message_component_section( comparison=comparison, diff=None, changes=None, links={"pull": "urlurl"} ) expected = [ - "| Components | Coverage Δ | |", + "| [Components](urlurl/components?src=pr&el=components) | Coverage Δ | |", "|---|---|---|", - "| go_files | `62.50% <66.67%> (+12.50%)` | :arrow_up: |", - "| py_files | `50.00% <ø> (ø)` | |", + "| [go_files](urlurl/components?src=pr&el=component) | `62.50% <66.67%> (+12.50%)` | :arrow_up: |", + "| [py_files](urlurl/components?src=pr&el=component) | `50.00% <ø> (ø)` | |", ] assert message == expected @@ -4685,9 +4685,9 @@ async def test_write_message_component_section_no_base( comparison=comparison, diff=None, changes=None, links={"pull": "urlurl"} ) expected = [ - "| Components | Coverage Δ | |", + "| [Components](urlurl/components?src=pr&el=components) | Coverage Δ | |", "|---|---|---|", - "| go_files | `62.50% <0.00%> (?)` | |", - "| py_files | `50.00% <0.00%> (?)` | |", + "| [go_files](urlurl/components?src=pr&el=component) | `62.50% <0.00%> (?)` | |", + "| [py_files](urlurl/components?src=pr&el=component) | `50.00% <0.00%> (?)` | |", ] assert message == expected diff --git a/tasks/tests/integration/test_notify_task.py b/tasks/tests/integration/test_notify_task.py index 7cf5f4e50..db37b80d4 100644 --- a/tasks/tests/integration/test_notify_task.py +++ b/tasks/tests/integration/test_notify_task.py @@ -1177,9 +1177,9 @@ async def test_simple_call_status_and_notifiers( " Misses 3 3 ", "```", "", - "| Flag | Coverage Δ | |", + "| [Flag](https://myexamplewebsite.io/gh/test-acc9/test_example/pull/1/flags?src=pr&el=flags) | Coverage Δ | |", "|---|---|---|", - "| unit | `85.00% <ø> (ø)` | |", + "| [unit](https://myexamplewebsite.io/gh/test-acc9/test_example/pull/1/flags?src=pr&el=flag) | `85.00% <ø> (ø)` | |", "", "Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more." "",