Add support to embed source metadata from git#1444
Conversation
dfreilich
left a comment
There was a problem hiding this comment.
This looks like a really great start!
Our pkg/client directory is already pretty full, and we seem to typically put our direct commands there. I would instead suggest putting the metadata.go file (and accompanying test) in the pkg/project/v2 directory). What do you think, @jromero ?
Once this is confirmed by others, I'll move the files There is a couple of things on git vs our implementation of the commands that I wanted to point out here
I am not too sure how to write acceptance tests for this, (are they even required or not?) but if we decide on writing it then we'll probably have to create some dummy files and folders that act as our git repository to test on. Let me know if there is another approach available. |
4a8c2cf to
4d76ba3
Compare
Signed-off-by: Nitish Gupta <imnitish.ng@gmail.com>
Signed-off-by: Nitish Gupta <imnitish.ng@gmail.com>
Signed-off-by: Nitish Gupta <imnitish.ng@gmail.com>
- Add support to fetch and save the origin remote URL of a git repo Signed-off-by: Nitish Gupta <imnitish.ng@gmail.com>
Signed-off-by: Nitish Gupta <imnitish.ng@gmail.com>
- Add ability to parse tags if they exist in multiple branches - Add test cases to cover possible branching and tag scenarios - Add new util method and tests Signed-off-by: Nitish Gupta <imnitish.ng@gmail.com>
54a5a27 to
713984d
Compare
Codecov Report
@@ Coverage Diff @@
## main #1444 +/- ##
==========================================
- Coverage 81.38% 81.29% -0.09%
==========================================
Files 152 154 +2
Lines 9864 10014 +150
==========================================
+ Hits 8027 8140 +113
- Misses 1360 1393 +33
- Partials 477 481 +4
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
I might also need some pointers on the failing test cases, not sure what is happening and it's also taking a long time for it to complete. |
713984d to
11da95a
Compare
Signed-off-by: Nitish Gupta <imnitish.ng@gmail.com>
11da95a to
032e9e7
Compare
Signed-off-by: Javier Romero <root@jromero.codes>
Signed-off-by: Javier Romero <root@jromero.codes>
I'm going to merge this as is given the code coverage at the unit level. I'm working on refactoring the acceptance test suite to be easier to work with. As part of that work, I'll see if we can test this set of functionality as well. |
Summary
Add support to add source metadata from git, to complete #1280
git describe --tags --alwaysgit remoteOutput
Before
After
Documentation
Related
Resolves #1137