Closed pirata99 closed 11 months ago
Hi @pirata99!
Thanks for raising this issue and thanks for contributing in making this project better!
I think the issue could be because azure pipeline only download the last commit. We have a discussion explaining that here. I hope it will help
Hi @scolladon !
Thanks for your answer. I read the discussion explained and it makes sense that Azure does not recognize "HEAD~1" branch. Do you recommend me some solution to fix the issue? Using branches for example?
Thanks again Pau M
I think you can still use "HEAD~1
" @pirata99
But to do so you need to tell Azure pipeline to fetch those commits.
The number of commits fetched is settable with the fetchDepth
parameter.
Here is the explanation of how to disable shallow fetching
Thanks @scolladon for your fast response.
By the way, I think if I set fetchDepth to 0, then I won't never get the previous commit, right? Can you confirm this?
Thanks
I think you will Setting it to 0 makes the pipeline retrieving all the commits (according to the doc)
@pirata99 feel free to close this issue if you found your answer
Hey @scolladon . I solved the issue that you mentioned about HEAD and HEAD~1. However, I am having problems to get the output of the result. I do this command:
sfdx sgd:source:delta --from "HEAD~1" --output changed-sources/ --generate-delta
I have changed-sources directory created, but no output is found there (and I did changes in different commits). Do you have some idea?
Many thanks for everything.
Hi @pirata99, do you reproduce this issue locally? If no, could you give us the azure pipeline definition you are using please? I think there is something with how commits are fetched with azure pipeline and I suspect only the current commit is checked out even if everything is fetched.
Hi @pirata99
Have you been able to find a resolve this? Let us know so we can either help you or close this issue
Hi @scolladon ,
Nice to meet you. I am using sfdx-git-delta to my DevOps Development (Salesforce-Azure Devops) but when I execute the pipeline, when commit is done, I initialize the job and i do the specific downloads (Server JWT Key, git configs, Node.js, salesforce CLI and Delta) and when I execute the command to compare different commits (current and previous):
Then, the response is the next one:
I suppose that the issue could be on the endline (\n) that appears in the final of the "error" attribute. But I don't know how it is produced. Can you help me to solve the issue?
Thanks a lot, Pau M