File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ package aws
2
2
3
3
import (
4
4
"fmt"
5
+ "reflect"
5
6
"regexp"
7
+ "strings"
6
8
7
9
"github.com/aws/aws-sdk-go/aws"
8
10
"github.com/aws/aws-sdk-go/aws/session"
@@ -103,6 +105,9 @@ func (cplMgr *codePipelineManager) GetGitInfo(pipelineName string) (common.GitIn
103
105
}
104
106
105
107
if actionState .CurrentRevision != nil && actionState .CurrentRevision .RevisionId != nil {
108
+ fmt .Println (reflect .TypeOf (actionState .CurrentRevision .RevisionId ))
109
+ // Remove leading period, if it exists
110
+ * actionState .CurrentRevision .RevisionId = strings .TrimPrefix (* actionState .CurrentRevision .RevisionId , "." )
106
111
gitInfo .Revision = aws .StringValue (actionState .CurrentRevision .RevisionId )
107
112
}
108
113
return gitInfo , nil
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ func TestCodePipelineManager_GetGitInfo_S3(t *testing.T) {
177
177
Status : aws .String ("Succeeded" ),
178
178
},
179
179
CurrentRevision : & codepipeline.ActionRevision {
180
- RevisionId : aws .String ("NN2QtU0xO2HlXFWnMb1C8bzsoP9eiG7q" ),
180
+ RevisionId : aws .String (". NN2QtU0xO2HlXFWnMb1C8bzsoP9eiG7q" ),
181
181
},
182
182
},
183
183
},
You can’t perform that action at this time.
0 commit comments