Skip to content

Commit

Permalink
Fix link previews (part 2) (#3073)
Browse files Browse the repository at this point in the history
<!--
Open the PR up as a draft until you feel it is ready for a proper
review.

Do not make PR:s from your own `main` branch, as that makes it difficult
for reviewers to add their own fixes.

Add any improvements to the branch as new commits to make it easier for
reviewers to follow the progress. All commits will be squashed to a
single commit once the PR is merged into `main`.

Make sure you mention any issues that this PR closes in the description,
as well as any other related issues.

To get an auto-generated PR description you can put "copilot:summary" or
"copilot:walkthrough" anywhere.
-->

### What

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3073) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/3073)
- [Docs
preview](https://rerun.io/preview/e3f65bfab3f8192853f1942fc070c5c3689fb464/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/e3f65bfab3f8192853f1942fc070c5c3689fb464/examples)
<!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
  • Loading branch information
jprochazk authored Aug 22, 2023
1 parent e210793 commit 56a7890
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions scripts/ci/update_pr_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,19 @@ def main() -> None:

new_body = pr.body

docs_preview_link_end = new_body.find(DOCS_PREVIEW_MARKER) + len(DOCS_PREVIEW_MARKER)
docs_preview_link_start = new_body.rfind("\n", 0, docs_preview_link_end) + 1
new_body = new_body[:docs_preview_link_start] + DOCS_PREVIEW_BARE_LINK + new_body[docs_preview_link_end:]

examples_preview_link_end = new_body.find(EXAMPLES_PREVIEW_MARKER) + len(EXAMPLES_PREVIEW_MARKER)
examples_preview_link_start = new_body.rfind("\n", 0, examples_preview_link_end) + 1
new_body = (
new_body[:examples_preview_link_start] + EXAMPLES_PREVIEW_BARE_LINK + new_body[examples_preview_link_end:]
)
docs_preview_link_end = new_body.find(DOCS_PREVIEW_MARKER)
if docs_preview_link_end != -1:
docs_preview_link_end += len(DOCS_PREVIEW_MARKER)
docs_preview_link_start = new_body.rfind("\n", 0, docs_preview_link_end) + 1
new_body = new_body[:docs_preview_link_start] + DOCS_PREVIEW_BARE_LINK + new_body[docs_preview_link_end:]

examples_preview_link_end = new_body.find(EXAMPLES_PREVIEW_MARKER)
if examples_preview_link_end != -1:
len(EXAMPLES_PREVIEW_MARKER)
examples_preview_link_start = new_body.rfind("\n", 0, examples_preview_link_end) + 1
new_body = (
new_body[:examples_preview_link_start] + EXAMPLES_PREVIEW_BARE_LINK + new_body[examples_preview_link_end:]
)

new_body = env.from_string(new_body).render(
pr={
Expand Down

0 comments on commit 56a7890

Please sign in to comment.