question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

comment --pr=true default

See original GitHub issue

https://github.blog/changelog/2022-08-04-commit-comments-no-longer-appear-in-the-pull-request-timeline/ meaning the --pr flag is now mandatory for CML reports to show up in PRs. Kinda a UX breaking change potentially.

Options (pick just one):

  1. update docs & examples, adding --pr everywhere (breaking change, https://github.com/iterative/cml.dev/issues/331)
also auto-detect this/print warnings?
$ cml comment ...
(ok)
$ cml pr ...
(ok)
$ cml comment ...
WARNING: did you forget `--pr` flag?
  1. cml comment ... [--pr=true] by default (UX friendly)
    • iff not in a PR, print a warning and fallback to --pr=false (commit-comment)
    • users need explicit --pr=false/--no-pr to use commit-comments in PRs (edge case)
  2. cml comment ... [--pr=auto] by default (better fail-not-warn error handling)
    • try to PR-comment, fallback to commit-comment
    • explicit --pr={true,false} throws error on failure (no fallback)
    • however, is this implementation possible? does yargs allow --flag=foo == "foo" && --flag == true (latter needed for backwards compat)?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
tasdomascommented, Oct 4, 2022
1. Bitbucket, as usual, does not support commit comments. [leftwards_arrow_with_hook](#user-content-fnref-1-bc519f06fb4bd021a0f1bade91b47e07)

What about this ?

1reaction
0x2b3bfa0commented, Sep 4, 2022

Suggested solution

Commit comments are unequivocally tied to a commit, but aren’t supported on every forge.[^1] Wouldn’t it be better if we used --pr everywhere and, perhaps, added a footer showing the commit hash?

[^1]: Bitbucket, as usual, does not support commit comments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Choose comment settings - YouTube Help - Google Support
Change your default comment settings · Sign in to YouTube Studio. · From the left menu, select Settings. · Select Community and then...
Read more >
Preserve property comment and insert @default value, if ...
As the title suggests, insert a @default comment to the TSDoc AST if an initializer is provided, preserving the original comment.
Read more >
Make Case Comments "Public" by default - IdeaExchange
As a workaround you can use a quick action to post a case comment, add the isPublished field and set to TRUE as...
Read more >
#51082 (Default value for comment_type changed can lead to ...
Had a situation where a theme would not show comments any more with WP 5.5, it would show correct number of comments but...
Read more >
Default Font for Comments - Word Ribbon Tips
Default Font for Comments ... This is the body of the actual comment, as already noted earlier in this tip. Some readers also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found