(feat) add repo metadata to export csv result#50857
Conversation
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 3cadca9...f09abde.
|
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits f09abde and 3cadca9 or learn more. Open explanation
|
| new URL(getRepositoryUrl(result.repository, result.branches), sourcegraphURL).toString(), | ||
| ]), | ||
| ] | ||
| content = !enableRepositoryMetadata |
There was a problem hiding this comment.
A lot of repeated code in these two branches of the ternary operation. Can we instead modify the function inside the map to return the right value based on the condition?
There was a problem hiding this comment.
Thank you for the suggestion—updated f09abde.
P.S: Also, by the end of the prfaq, all these feature flag checks/conditions will be removed since the feature be enabled for GA, which will make the code more straightforward.
… function by removing duplicate code and using ternary operator to conditionally add repository metadata headers and values
vdavid
left a comment
There was a problem hiding this comment.
LGTM!
Not sure how those unrelated Percy changes got to this branch 😕 they have nothing to do with this PR, but they might block you form merging this hmm. I'd reach out to devX of #dev-frontend about them.
Thanks for the review, @vdavid. Regarding Percy snapshots, yes they are not related to the PR, but I assume they are flaky ones. As far as I know percy job is not required, but rather a good way to understand what changes were introduced whether intentionally or accidentally. |
Part of https://github.com/sourcegraph/pr-faqs/issues/96.
Test plan
sg startrepository-metadatafeature flagaddRepoKeyValuePairAPIselect:repoand export resultsScreenshot