You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the end of the jx preview command, a comment is written on the Pull Request to say that the preview env is ready, with the link to the preview env.
The issue is that this comment is written each time the jx preview is run, which means that each time someone commit/push, the pipeline will run jx comment, and this will result in a new comment. It's not unusual to end up with tens of "useless" comments like that on a PR.
There is a flag to disable this feature - --no-comment - but there is nothing to ask for a single comment the first time the preview env is deployed.
Steps to reproduce the behavior
create a PR
push code a few times
Expected behavior
the bot will add a single comment to the PR will the link to the preview env
Actual behavior
a comment is written on the PR for each code push (pipeline run), which can be seen as "spam"
Jx version
The output of jx version is:
Version 2.1.86-dev+c65b5e25b
Commit c65b5e25b
Build date 2020-09-12T15:38:23Z
Go version 1.15.1
Git tree state dirty
The text was updated successfully, but these errors were encountered:
vbehar
added a commit
to vbehar/jx
that referenced
this issue
Sep 12, 2020
fixesjenkins-x#7562
This adds a new flag to the `jx preview` command: `--single-comment`
With this flag, the Pull Request comment will only be sent once - the first time.
We use a new annotation on the Environment resource to store the last date a comment has been sent.
Signed-off-by: Vincent Behar <[email protected]>
fixes#7562
This adds a new flag to the `jx preview` command: `--single-comment`
With this flag, the Pull Request comment will only be sent once - the first time.
We use a new annotation on the Environment resource to store the last date a comment has been sent.
Signed-off-by: Vincent Behar <[email protected]>
Summary
At the end of the
jx preview
command, a comment is written on the Pull Request to say that the preview env is ready, with the link to the preview env.The issue is that this comment is written each time the
jx preview
is run, which means that each time someone commit/push, the pipeline will runjx comment
, and this will result in a new comment. It's not unusual to end up with tens of "useless" comments like that on a PR.There is a flag to disable this feature -
--no-comment
- but there is nothing to ask for a single comment the first time the preview env is deployed.Steps to reproduce the behavior
Expected behavior
Actual behavior
Jx version
The output of
jx version
is:The text was updated successfully, but these errors were encountered: