@@ -120,9 +120,7 @@ type PipelineVariable struct {
120120
121121type PipelineKeyPair struct {
122122 Type string
123- Uuid string
124- PublicKey string
125- PrivateKey string
123+ Public_key string
126124}
127125
128126type PipelineBuildNumber struct {
@@ -726,6 +724,17 @@ func (r *Repository) UpdatePipelineVariable(opt *RepositoryPipelineVariableOptio
726724 return decodePipelineVariableRepository (response )
727725}
728726
727+ func (r * Repository ) GetPipelineKeyPair (rpkpo * RepositoryPipelineKeyPairOptions ) (* PipelineKeyPair , error ) {
728+ urlStr := r .c .requestUrl ("/repositories/%s/%s/pipelines_config/ssh/key_pair" , rpkpo .Owner , rpkpo .RepoSlug )
729+
730+ response , err := r .c .execute ("GET" , urlStr , "" )
731+ if err != nil {
732+ return nil , err
733+ }
734+
735+ return decodePipelineKeyPairRepository (response )
736+ }
737+
729738func (r * Repository ) AddPipelineKeyPair (rpkpo * RepositoryPipelineKeyPairOptions ) (* PipelineKeyPair , error ) {
730739 data , err := r .buildPipelineKeyPairBody (rpkpo )
731740 if err != nil {
@@ -741,6 +750,11 @@ func (r *Repository) AddPipelineKeyPair(rpkpo *RepositoryPipelineKeyPairOptions)
741750 return decodePipelineKeyPairRepository (response )
742751}
743752
753+ func (r * Repository ) DeletePipelineKeyPair (rpkpo * RepositoryPipelineKeyPairOptions ) (interface {}, error ) {
754+ urlStr := r .c .requestUrl ("/repositories/%s/%s/pipelines_config/ssh/key_pair" , rpkpo .Owner , rpkpo .RepoSlug )
755+ return r .c .execute ("DELETE" , urlStr , "" )
756+ }
757+
744758func (r * Repository ) UpdatePipelineBuildNumber (rpbno * RepositoryPipelineBuildNumberOptions ) (* PipelineBuildNumber , error ) {
745759 data , err := r .buildPipelineBuildNumberBody (rpbno )
746760 if err != nil {
0 commit comments