-
Notifications
You must be signed in to change notification settings - Fork 36
Enhance comment footer on PR messages #495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5409455
to
95f5a93
Compare
ready for a new review plus #495 (comment) |
About your
option (a) is already implemented by 63fb1fd |
I'd rather (b), but since it requires a small change in the design, I'd prefer to obtain your validation before start working on it. |
I really like option (b). But it's ok for me to close this as-is and then open another issue for that. 👍 |
I prefer a. |
Oh, right. That's dangerous. |
@carlosms @se7entyse7en I see reasonable to let the repo maintainers override the feedback URL that is being used in the comments posted in their repos? Maybe they misconfigured the analyzer with their local |
Still, I see that as a different use case I think it makes sense that the feedback link can be changed by the people deploying lookout and the analyzers (let's say the SaaS admin); but not any users of the SaaS. The comment is posted by the gh app bot, and the contents of those comments should be only managed by the owner of said bot. What if I installed lookout on my repo, and changed the feedback link to some malicious link? The comment would still be posted as lookout bot, and the admin would be responsible. |
So then all PR comments were already addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
👏 |
097d024
to
3ab7291
Compare
Signed-off-by: David Pordomingo <[email protected]>
fix #472
If the template uses old
sprintf
format (with%s
),lookoutd
will log a Warning:and no footer will be added; same behavior in other cases like: wrong template, no enough data passed to the template...
ussage, from docs in this PR:
Add a Custom Message to the Posted Comments
You can configure source{d} Lookout to add a custom message to every comment that each analyzer returns. This custom message will be created passing to the template defined by
providers.github.comment_footer
, thename
andfeedback
defined for each analyzer configuration.If the template (
providers.github.comment_footer
) is empty, or the analyzer configuration does not define any of the values that the template requires, the custom message won't be added.Example:
Will require that each analyzer defines its
name
andfeedback
in order to render its custom message appended to its comments, so:Comments from
Fancy Analyzer
will be appended with the message:but comments from
Awesome Analyzer
wont be appended with a custom message because its configuration lacks of a key defining itsfeedback
value.