@@ -120,9 +120,7 @@ type PipelineVariable struct {
120
120
121
121
type PipelineKeyPair struct {
122
122
Type string
123
- Uuid string
124
- PublicKey string
125
- PrivateKey string
123
+ Public_key string
126
124
}
127
125
128
126
type PipelineBuildNumber struct {
@@ -726,6 +724,17 @@ func (r *Repository) UpdatePipelineVariable(opt *RepositoryPipelineVariableOptio
726
724
return decodePipelineVariableRepository (response )
727
725
}
728
726
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
+
729
738
func (r * Repository ) AddPipelineKeyPair (rpkpo * RepositoryPipelineKeyPairOptions ) (* PipelineKeyPair , error ) {
730
739
data , err := r .buildPipelineKeyPairBody (rpkpo )
731
740
if err != nil {
@@ -741,6 +750,11 @@ func (r *Repository) AddPipelineKeyPair(rpkpo *RepositoryPipelineKeyPairOptions)
741
750
return decodePipelineKeyPairRepository (response )
742
751
}
743
752
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
+
744
758
func (r * Repository ) UpdatePipelineBuildNumber (rpbno * RepositoryPipelineBuildNumberOptions ) (* PipelineBuildNumber , error ) {
745
759
data , err := r .buildPipelineBuildNumberBody (rpbno )
746
760
if err != nil {
0 commit comments