Hi Mark, Let me check for the GITHUB REST API's. Thanks for the reply. 

On Saturday, October 12, 2019 at 4:12:14 AM UTC+5:30, Mark Waite wrote:
>
> The git ls-remote command is not allowed to list remote files, only remote 
> references (branches and tags).
>
> Git providers (GitHub, Bitbucket, Gitea, Assembla, Beanstalk, Gitlab, 
> etc.) generally provide one or more REST API's that will list remote files 
> in a branch.
>
> On Thursday, October 10, 2019 at 11:37:34 PM UTC-8, Ajay Sharma wrote:
>>
>> Hi Everyone, Good Morning.
>>
>> Request any ones help to List All FILES from the GIT BRANCH.  
>> I am trying to first list Branches of a GIT REPO, then list the files of 
>> the BRANCH. 
>>
>> I am facing problem while listing files of the BRANCH. 
>>
>> I have used this code List files Of the GIT REPO with   *Extended Choice 
>> Parameter*. 
>>
>> def gettags = ("git ls-remote -t -h 
>> http://pramod:[email protected]/pramod/automaticjobs.git
>> ").execute()
>> return gettags.text.readLines().collect { 
>>   it.split()[1].replaceAll('refs/heads/', '').replaceAll('refs/tags/', 
>> '').replaceAll("\\^\\{\\}", '')
>> }
>>
>> BUT this code is not working for Listing the Files of the GIT BRANCH. 
>>
>> def gettags = ("git ls-remote -t -h 
>> http://pramod:[email protected]/pramod/automaticjobs.git -r 
>> {env.Branches}").execute()
>> return gettags.text.readLines().collect { 
>>   it.split()[1].replaceAll('refs/heads/', '').replaceAll('refs/tags/', 
>> '').replaceAll("\\^\\{\\}", '')
>> }
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/cad6371c-2015-4d34-a9ba-d852d9259197%40googlegroups.com.

Reply via email to