Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Clutch
Commits
88f2514a
Unverified
Commit
88f2514a
authored
3 years ago
by
Shawna Monero
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
add parent to parent (#1631)
parent
a9683f4f
yarn12211
CDPATH-edge-case
FixCordonNotes
GA4
RHF
add-capacity-info
add-list-pr-gh-api
add-origin
add-tabledetails-notes
addCaseInsensitiveAutocomplete
addSgTimeout
addTimeoutForSG
allIcons
appProviderRewrite
attempt-pure-css-wrap
auditAPI
auditBE
auditFE
autoSubmit
autoSubmitResolvers
autocomplete-clear-value
aws-multi-account
aws-multi-account-final-cutover
aws-multi-account-gen-clients
aws-multi-account-protos
base64GH
blogNits
callbackToSetIndex
caseInsens1
catalog-config-extension
catalog-ql-patch
cfgExtends
changeGridLines
chaos_server-fault-enable-greater-precision
chartTests
clearMocks
clickAutocomplete
codecov
colorsFile
commitsViaComparison
compose-duplicate-test
custom-title-logo
customHookForTimelinePleaseWork
darkModeTest1
dashLayout
dashLoadedCheck
datetimevalid
ddb-fe
ddb-panic-fix
ddb-refactor
ddb-refactor-endpoint
ddb-response-proto
ddb-scale-factor-fix
ddb-updategsicapacity
ddb-updatetable
deletePodLocationNotes
dev-req-check-tool
dialogCSS
direct-client
docshousekeeping
dotenv
downloadConfigEnvoy
dschaller-patch-1
dschaller-patch-2
dschaller-patch-3
dynamodb-panic-fix
dynamodb-status-chips
dynamodb-update-more-logs
dynamodb-wz-1
emojiSupport
enable-partial-failures-for-pods
envoy-cp-update
envoyTriageViaK8sDash
errorBoundaryLocation
eslintdocs
expSimplification
exportEmotionThings
expose-k8s-clientsets
feedbackMaxLength
first-of-type-fix
firstgogogo
fix-autocomplete-project-catalog
fix-github-app-auth-refresh
fix-homedir-copy
fixAlignOfIcons
fixConfigTypes
fixDASHSpacing
fixDashSpacingPart1
fixwarning
frontend-autocomplete-patch
frontend-catalog-navigate-patch
frontend-highlight-parent
frontend-project-selector-patch
frontend-warning-extension
gcp-0.10.3
get-logs
ghrl
glangci-test
go-1-18
go-1.19-in-ci
go-actions-1-18
go-github-v38
golangci
goworkspace
graphql
group-item-prefix
header-adjustments
hooksForAutoRefresh
horizontalExpansion
housekeepingclutch
iam-custompolicy-sim
iconButton
iconButtonColors
inputTransformers
jest-coverage-fix
jg/github
jslaughter-patch-1
k8sDashAutosubmit
license-update
linkCSS
load-state-error
lowercaseAutocomplete
main
matv5
matv5-base
matv5-core
matv5-core-input
matv5-core-layout
matv5-joined
matv5-wizard
matv5-workflows
metrics-blog
metricsAPI
metricsProtos
mikecutalo-patch-1
minimistClutch
moarTests
moartests
mockProjects
mui-5-upgrade
mui-v5
mui-v5-codemods
mui-v5-core
mui5
muiv5-upgrade
murki-patch-1
nodeNameInCordonNode
nonexistantProjects
nps-anytime
nps-collector
nps-custom-patch
openSourceReactMarkdownPane
otherEventTimes
override-search
paperMinWidth
pcDefaultProjects
pcResetState
pcSearch
pcSubtext
pd-info-project-proto
persistProjects
preflight-check-script
project-api-mocks
project-api-optional-compute-deps
project-catalog
project-catalog-config-patch
project-catalog-config-skeleton
project-catalog-details
project-catalog-scaffold
project-selector-autocomplete
project-selector-testing
project404
proto-get-endpoint
protoForDeploys
qLinks1
qLinksF
qLinksForProjSelector
quickLinks1
quicklinks1
reactHookForm
refreshDropdown
registrarEmptyRoutes
relativeCfgDir
reloadIntervalForProjSelector
remove-utm-params
removeBottomFeedbackButton
removeIcon
renderTestTimeseriesChart
renovate-patch
renovate/actions-setup-node-3.x
renovate/actions-stale-6.x
renovate/actions-upload-artifact-3.x
renovate/babel-monorepo
renovate/cypress-10.x
renovate/cypress-8.x
renovate/cypress-9.x
renovate/docker-build-push-action-2.x
renovate/docker-build-push-action-3.x
renovate/docker-login-action-2.x
renovate/docker-setup-buildx-action-2.x
renovate/esbuild-0.x
renovate/eslint-config-airbnb-19.x
renovate/eslint-plugin-jest-25.x
renovate/eslint-plugin-jest-26.x
renovate/eslint-plugin-prettier-4.x
renovate/font-awesome
renovate/github.com-aws-aws-sdk-go-v2-1.x
renovate/github.com-aws-aws-sdk-go-v2-config-1.x
renovate/github.com-aws-aws-sdk-go-v2-credentials-1.x
renovate/github.com-aws-aws-sdk-go-v2-service-autoscaling-1.x
renovate/github.com-aws-aws-sdk-go-v2-service-kinesis-1.x
renovate/github.com-aws-aws-sdk-go-v2-service-s3-1.x
renovate/github.com-aws-smithy-go-1.x
renovate/github.com-bradleyfalzon-ghinstallation-2.x
renovate/github.com-bufbuild-buf-0.x
renovate/github.com-bufbuild-buf-1.x
renovate/github.com-coreos-go-oidc-v3-3.x
renovate/github.com-envoyproxy-go-control-plane-0.x
renovate/github.com-envoyproxy-protoc-gen-validate-0.x
renovate/github.com-fullstorydev-grpcurl-1.x
renovate/github.com-gogo-status-1.x
renovate/github.com-golang-migrate-migrate-v4-4.x
renovate/github.com-google-go-github-v37-38.x
renovate/github.com-grpc-ecosystem-grpc-gateway-v2-2.x
renovate/github.com-jhump-protoreflect-1.x
renovate/github.com-lib-pq-1.x
renovate/github.com-masterminds-squirrel-1.x
renovate/github.com-shurcool-githubv4-digest
renovate/github.com-shurcool-graphql-digest
renovate/github.com-slack-go-slack-0.x
renovate/github.com-stretchr-testify-1.x
renovate/github.com-uber-go-tally-v4-4.x
renovate/github.com-yoheimuta-go-protoparser-v4-4.x
renovate/go-1.x
renovate/go.temporal.io-sdk-1.x
renovate/go.temporal.io-sdk-contrib-tally-0.x
renovate/go.uber.org-zap-1.x
renovate/golang-1.x
renovate/golang.org-x-net-digest
renovate/google.golang.org-genproto-digest
renovate/google.golang.org-grpc-1.x
renovate/google.golang.org-grpc-cmd-protoc-gen-go-grpc-1.x
renovate/google.golang.org-protobuf-1.x
renovate/hookform-devtools-3.x
renovate/hookform-devtools-4.x
renovate/hookform-resolvers-2.x
renovate/k8s.io-api-0.x
renovate/k8s.io-apimachinery-0.x
renovate/k8s.io-client-go-0.x
renovate/k8s.io-utils-digest
renovate/kubernetes-go
renovate/lock-file-maintenance
renovate/major-1-kubernetes-go
renovate/major-10-definitelytyped
renovate/major-10-kubernetes-go
renovate/major-11-kubernetes-go
renovate/major-16-definitelytyped
renovate/major-17-react-monorepo
renovate/major-18-definitelytyped
renovate/major-18-react-monorepo
renovate/major-19-eslint
renovate/major-2-kubernetes-go
renovate/major-27-definitelytyped
renovate/major-27-unittest
renovate/major-28-definitelytyped
renovate/major-28-unittest
renovate/major-29-definitelytyped
renovate/major-3-kubernetes-go
renovate/major-4-eslint
renovate/major-5-typescript-eslint-monorepo
renovate/major-6-font-awesome
renovate/major-8-eslint
renovate/major-8-remark-monorepo
renovate/material-table-1.x
renovate/material-table-2.x
renovate/nivo-monorepo
renovate/node-16.x
renovate/node-17.x
renovate/node-18.x
renovate/node-19.x
renovate/npm-axios-vulnerability
renovate/npm-prismjs-vulnerability
renovate/npm-protobufjs-vulnerability
renovate/postgres-14.x
renovate/postgres-15.x
renovate/react-hook-thunk-reducer-0.x
renovate/react-scripts-5.x
renovate/react-tiny-popover-7.x
renovate/webpack-4.x
renovate/webpack-dev-server-3.x
renovate/webpack-dev-server-4.x
renovateFix
replaceNivoWithRechartsForEnvoy
responsiveDash
responsiveProjectSelector
responsiveTable
return-partial-errors
revert-2270-addCaseInsensitiveAutocomplete
revert-2348-timeago-patch
s3accessdebugger-oss
safetyCheckForAccounts
scaffold-non-wizard
scaffold-update
scaffoldingYarn
scatterPlotTimeline
scrolling-menu
select-grouping
select-patch
shortlink-protos
shortlink-scaffolding
shortlink-wip
singleChoiceDrawer
sl-bug-fix
sl-patch
slowloris
smonero-patch-1
sourcegraph-impl
sourcegraph-service
spacingAdjustment
sperry-CreateFeedback-proto
sperry-GetFeedbackQuestions-proto
sperry-SubmitFeedback-API
sperry-add-GetSurveys-module
sperry-add-emojis
sperry-add-prop
sperry-autocomplete-fix-experimentations
sperry-card-header
sperry-card-loading-prop
sperry-cardcontent-paddingprop
sperry-cards-fullWidth
sperry-collapse-bttn
sperry-core-tooltip
sperry-enableFeedback-prop
sperry-extend-type
sperry-feedback-config
sperry-feedback-docs
sperry-globally-enable-wizard
sperry-incremental-dash-updates
sperry-migrate-card-framework
sperry-project-links-proto
sperry-project-selector-autocomplete
sperry-proxy-module-host-header
sperry-query-params
sperry-remove-npswizard-featureflag
sperry-resize-hpa-notes
sperry-see-more-card-action
sperry-stats-prefix
sperry-update-card-header-design
sperry-update-package
state-hydration
state-hydration-alerts
state-hydration-selector
state-hydration-short-links
state-hydration-storage
strictDash
supportStylingOfCharts
tableCSS
tablecss
temporal-client
tfAdornment
themeProvider
timeSelectorHooks
timeSeriesProto
timeago-component
todosPublic
toggleButtonGroup
toggleTest
transientProps
trimPrefixForAWS
typographyNoWrap
typographyStory
typographyfix
update-air-tool
update-card-styling
update-golangci-lint-1-42-1
update-kind-tool
updatePodEventProto
userGroups
validate-pattern-at-runtime
webicon
workflowYarnMin
wrapper2
wrapperForTimeSeries
wrapperForTimeSeries2
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
backend/service/github/github.go
+12
-5
backend/service/github/github.go
backend/service/github/github_test.go
+5
-0
backend/service/github/github_test.go
with
17 additions
and
5 deletions
+17
-5
backend/service/github/github.go
+
12
-
5
View file @
88f2514a
...
...
@@ -362,9 +362,10 @@ func (s *svc) CompareCommits(ctx context.Context, ref *RemoteRef, compareSHA str
}
type
Commit
struct
{
Files
[]
*
githubv3
.
CommitFile
Message
string
Author
*
githubv3
.
User
Files
[]
*
githubv3
.
CommitFile
Message
string
Author
*
githubv3
.
User
ParentRef
string
}
func
(
s
*
svc
)
GetCommit
(
ctx
context
.
Context
,
ref
*
RemoteRef
)
(
*
Commit
,
error
)
{
...
...
@@ -374,11 +375,17 @@ func (s *svc) GetCommit(ctx context.Context, ref *RemoteRef) (*Commit, error) {
}
// Currently we are using the Author (Github) rather than commit Author (Git)
ret
urn
&
Commit
{
ret
Commit
:=
&
Commit
{
Files
:
commit
.
Files
,
Message
:
commit
.
GetCommit
()
.
GetMessage
(),
Author
:
commit
.
GetAuthor
(),
},
nil
}
if
commit
.
Parents
!=
nil
&&
len
(
commit
.
Parents
)
>
0
{
retCommit
.
ParentRef
=
commit
.
Parents
[
0
]
.
GetSHA
()
}
return
retCommit
,
nil
}
func
(
s
*
svc
)
GetRepository
(
ctx
context
.
Context
,
repo
*
RemoteRef
)
(
*
Repository
,
error
)
{
...
...
This diff is collapsed.
Click to expand it.
backend/service/github/github_test.go
+
5
-
0
View file @
88f2514a
...
...
@@ -372,6 +372,7 @@ var getCommitsTests = []struct {
authorLogin
string
authorAvatarURL
string
authorID
int64
parentRef
string
}{
{
name
:
"v3 error"
,
...
...
@@ -385,6 +386,7 @@ var getCommitsTests = []struct {
message
:
"committing some changes (#1)"
,
authorAvatarURL
:
"https://foo.bar/baz.png"
,
authorID
:
1234
,
parentRef
:
"test"
,
},
}
...
...
@@ -422,6 +424,9 @@ func TestGetCommit(t *testing.T) {
a
.
Equal
(
tt
.
authorAvatarURL
,
*
commit
.
Author
.
AvatarURL
)
a
.
Equal
(
tt
.
authorID
,
*
commit
.
Author
.
ID
)
}
if
commit
.
ParentRef
!=
""
{
a
.
Equal
(
tt
.
parentRef
,
commit
.
ParentRef
)
}
a
.
Nil
(
err
)
})
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help