-
Notifications
You must be signed in to change notification settings - Fork 583
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
Track rubygems projects' targetFilerelativePath #975
Conversation
09e881a
to
bfcf617
Compare
for (let i = 0; i < resArray.length; i++) { | ||
results.push(_.assign(resArray[i], { path })); | ||
|
||
if (options.file && resArray[i].packageManager === 'rubygems') { |
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.
This might be better done
after https://github.com/snyk/snyk/blob/a724b210cd2ad38d7124ff6257ed571ee34d973a/src/lib/snyk-test/run-test.ts#L353 as there might be multiple files that are tested (--all-projects).
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.
Not sure I understand what you mean
@@ -155,6 +155,12 @@ async function monitor(...args0: MethodArgs): Promise<any> { | |||
const targetFileRelativePath = tFile | |||
? pathUtil.join(pathUtil.resolve(path), tFile) | |||
: ''; | |||
|
|||
// target file logging as a port of [Jira: BST-1124] | |||
if (packageManager === 'rubygems' && options.file) { |
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.
We should log this even if the options.file
option was not set
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.
so we definitely don't already track this in existing analytics?
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.
we don't
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.
what about older CLIs? Have you considered doing this in the main app instead?
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.
@lili2311 you are right, on it
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.
@lili2311 in registry
I can only get the file (flag usage and file itself), but not targetFileRelativeFile
, do we still want to proceed w/ registry
?
ok, IMO this can be dropped in favor of https://github.com/snyk/registry/pull/11380 @lili2311 wdyt? |
@aviadatsnyk yep agreed it would be better there |
@aviadhahami ^^ |
What does this PR do?
Added
analytics
logging for rubygems projects using--file
flag;