Skip to content

Commit 32dd1fd

Browse files
authored
fix: more typos (#1793)
Signed-off-by: David Calvert <[email protected]>
1 parent 02d7d27 commit 32dd1fd

File tree

40 files changed

+81
-81
lines changed

40 files changed

+81
-81
lines changed

backend/controllers/github.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ func handleInstallationDeletedEvent(installation *github.InstallationEvent) erro
326326
func handlePullRequestEvent(gh utils.GithubClientProvider, payload *github.PullRequestEvent, ciBackendProvider ci_backends.CiBackendProvider) error {
327327
appId, err := strconv.ParseInt(os.Getenv("GITHUB_APP_ID"), 10, 64)
328328
if err != nil {
329-
log.Printf("error getting github app isntallation id: %v", err)
329+
log.Printf("error getting github app installation id: %v", err)
330330
return fmt.Errorf("error getting github app installation id")
331331
}
332332

@@ -359,9 +359,9 @@ func handlePullRequestEvent(gh utils.GithubClientProvider, payload *github.PullR
359359
if action == "closed" {
360360
branchName, _, err := ghService.GetBranchName(prNumber)
361361
if err != nil {
362-
utils.InitCommentReporter(ghService, prNumber, fmt.Sprintf(":x: Could not retrive PR details, error: %v", err))
363-
log.Printf("Could not retrive PR details error: %v", err)
364-
return fmt.Errorf("Could not retrive PR details: %v", err)
362+
utils.InitCommentReporter(ghService, prNumber, fmt.Sprintf(":x: Could not retrieve PR details, error: %v", err))
363+
log.Printf("Could not retrieve PR details error: %v", err)
364+
return fmt.Errorf("Could not retrieve PR details: %v", err)
365365
}
366366
branchExists, err := ghService.CheckBranchExists(branchName)
367367
if err != nil {
@@ -409,7 +409,7 @@ func handlePullRequestEvent(gh utils.GithubClientProvider, payload *github.PullR
409409
if err != nil {
410410
log.Printf("could not determine digger command from job: %v", jobsForImpactedProjects[0].Commands)
411411
utils.InitCommentReporter(ghService, prNumber, fmt.Sprintf(":x: could not determine digger command from job: %v", err))
412-
return fmt.Errorf("unkown digger command in comment %v", err)
412+
return fmt.Errorf("unknown digger command in comment %v", err)
413413
}
414414

415415
if *diggerCommand == orchestrator_scheduler.DiggerCommandNoop {
@@ -541,7 +541,7 @@ func handlePullRequestEvent(gh utils.GithubClientProvider, payload *github.PullR
541541
if err != nil {
542542
log.Printf("TriggerDiggerJobs error: %v", err)
543543
utils.InitCommentReporter(ghService, prNumber, fmt.Sprintf(":x: TriggerDiggerJobs error: %v", err))
544-
return fmt.Errorf("error triggerring Digger Jobs")
544+
return fmt.Errorf("error triggering Digger Jobs")
545545
}
546546

547547
return nil
@@ -639,7 +639,7 @@ func getBatchType(jobs []orchestrator_scheduler.Job) orchestrator_scheduler.Digg
639639
func handleIssueCommentEvent(gh utils.GithubClientProvider, payload *github.IssueCommentEvent, ciBackendProvider ci_backends.CiBackendProvider) error {
640640
appId, err := strconv.ParseInt(os.Getenv("GITHUB_APP_ID"), 10, 64)
641641
if err != nil {
642-
log.Printf("error getting github app isntallation id: %v", err)
642+
log.Printf("error getting github app installation id: %v", err)
643643
return fmt.Errorf("error getting github app installation id")
644644
}
645645

@@ -709,9 +709,9 @@ func handleIssueCommentEvent(gh utils.GithubClientProvider, payload *github.Issu
709709

710710
diggerCommand, err := orchestrator_scheduler.GetCommandFromComment(*payload.Comment.Body)
711711
if err != nil {
712-
log.Printf("unkown digger command in comment: %v", *payload.Comment.Body)
712+
log.Printf("unknown digger command in comment: %v", *payload.Comment.Body)
713713
utils.InitCommentReporter(ghService, issueNumber, fmt.Sprintf(":x: Could not recognise comment, error: %v", err))
714-
return fmt.Errorf("unkown digger command in comment %v", err)
714+
return fmt.Errorf("unknown digger command in comment %v", err)
715715
}
716716

717717
prBranchName, _, err := ghService.GetBranchName(issueNumber)
@@ -860,7 +860,7 @@ func handleIssueCommentEvent(gh utils.GithubClientProvider, payload *github.Issu
860860
if err != nil {
861861
log.Printf("TriggerDiggerJobs error: %v", err)
862862
utils.InitCommentReporter(ghService, issueNumber, fmt.Sprintf(":x: TriggerDiggerJobs error: %v", err))
863-
return fmt.Errorf("error triggerring Digger Jobs")
863+
return fmt.Errorf("error triggering Digger Jobs")
864864
}
865865
return nil
866866
}
@@ -1028,7 +1028,7 @@ func (d DiggerController) GithubAppCallbackPage(c *gin.Context) {
10281028

10291029
// TODO: Lookup org in GithubAppInstallation by installationID if found use that installationID otherwise
10301030
// create a new org for this installationID
1031-
// retrive org for current orgID
1031+
// retrieve org for current orgID
10321032
installationIdInt64, err := strconv.ParseInt(installationId, 10, 64)
10331033
if err != nil {
10341034
log.Printf("strconv.ParseInt error: %v", err)
@@ -1075,7 +1075,7 @@ func (d DiggerController) GithubAppCallbackPage(c *gin.Context) {
10751075

10761076
client, _, err := d.GithubClientProvider.Get(*installation.AppID, installationId64)
10771077
if err != nil {
1078-
log.Printf("Error retriving github client: %v", err)
1078+
log.Printf("Error retrieving github client: %v", err)
10791079
c.JSON(http.StatusInternalServerError, gin.H{"error": "Error fetching organisation"})
10801080
return
10811081

backend/models/runs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (r *DiggerRun) MapToJsonStruct() (interface{}, error) {
117117
func (r DiggerRunStage) MapToJsonStruct() (*SerializedRunStage, error) {
118118
job, err := DB.GetDiggerJobFromRunStage(r)
119119
if err != nil {
120-
log.Printf("Could not retrive job from run")
120+
log.Printf("Could not retrieve job from run")
121121
return nil, err
122122
}
123123

backend/models/storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ func (db *Database) UpdateRepoDiggerConfig(orgId any, config configuration.Digge
11941194
projectName := dc.Name
11951195
p, err := db.GetProjectByName(orgId, repo, projectName)
11961196
if err != nil {
1197-
return fmt.Errorf("error retriving project by name: %v", err)
1197+
return fmt.Errorf("error retrieving project by name: %v", err)
11981198
}
11991199
if p == nil {
12001200
_, err := db.CreateProject(projectName, org, repo, dc.Generated, isMainBranch)

backend/utils/github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func SetPRStatusForJobs(prService ci.PullRequestService, prNumber int, jobs []sc
168168
err = prService.SetStatus(prNumber, "pending", job.ProjectName+"/apply")
169169
}
170170
if err != nil {
171-
log.Printf("Erorr setting status: %v", err)
171+
log.Printf("Error setting status: %v", err)
172172
return fmt.Errorf("Error setting pr status: %v", err)
173173
}
174174
}

backend/utils/graphs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func ConvertJobsToDiggerJobs(jobType scheduler.DiggerCommand, vcsType models.Dig
1919
organisation, err := models.DB.GetOrganisationById(organisationId)
2020
if err != nil {
2121
log.Printf("Error getting organisation: %v %v", organisationId, err)
22-
return nil, nil, fmt.Errorf("error retriving organisation")
22+
return nil, nil, fmt.Errorf("error retrieving organisation")
2323
}
2424
organisationName := organisation.Name
2525

cli/cmd/digger/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func main() {
7272
os.Args = append([]string{os.Args[0]}, "default")
7373
}
7474
if err := rootCmd.Execute(); err != nil {
75-
usage.ReportErrorAndExit("", fmt.Sprintf("Error occured during command exec: %v", err), 8)
75+
usage.ReportErrorAndExit("", fmt.Sprintf("Error occurred during command exec: %v", err), 8)
7676
}
7777

7878
}

cli/pkg/digger/digger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func RunJobs(jobs []orchestrator.Job, prService ci.PullRequestService, orgServic
156156
}
157157
err = UpdateAggregateStatus(batchResult, prService)
158158
if err != nil {
159-
log.Printf("error udpating aggregate status check: %v.\n", err)
159+
log.Printf("error updating aggregate status check: %v.\n", err)
160160
return false, false, err
161161
}
162162

cli/pkg/github/github.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"strings"
2626
)
2727

28-
func GitHubCI(lock core_locking.Lock, policyCheckerProvider core_policy.PolicyCheckerProvider, backendApi core_backend.Api, reportingStrategy reporting.ReportStrategy, githubServiceProvider dg_github.GithubServiceProvider, commentUpdaterProvider comment_updater.CommentUpdaterProvider, driftNotifcationProvider drift.DriftNotificationProvider) {
28+
func GitHubCI(lock core_locking.Lock, policyCheckerProvider core_policy.PolicyCheckerProvider, backendApi core_backend.Api, reportingStrategy reporting.ReportStrategy, githubServiceProvider dg_github.GithubServiceProvider, commentUpdaterProvider comment_updater.CommentUpdaterProvider, driftNotificationProvider drift.DriftNotificationProvider) {
2929
log.Printf("Using GitHub.\n")
3030
githubActor := os.Getenv("GITHUB_ACTOR")
3131
if githubActor != "" {
@@ -34,7 +34,7 @@ func GitHubCI(lock core_locking.Lock, policyCheckerProvider core_policy.PolicyCh
3434
usage.SendUsageRecord("", "log", "non github initialisation")
3535
}
3636

37-
// default policy checker for backwards compatability, will be overriden in orchestrator flow
37+
// default policy checker for backwards compatibility, will be overridden in orchestrator flow
3838
hostName := os.Getenv("DIGGER_HOSTNAME")
3939
token := os.Getenv("DIGGER_TOKEN")
4040
orgName := os.Getenv("DIGGER_ORGANISATION")
@@ -194,7 +194,7 @@ func GitHubCI(lock core_locking.Lock, policyCheckerProvider core_policy.PolicyCh
194194
CommandEnvProvider: CommandEnvProvider,
195195
}
196196

197-
notification, err := driftNotifcationProvider.Get(githubPrService)
197+
notification, err := driftNotificationProvider.Get(githubPrService)
198198
if err != nil {
199199
usage.ReportErrorAndExit(githubActor, fmt.Sprintf("could not get drift notification type: %v", err), 8)
200200
}
@@ -241,7 +241,7 @@ func GitHubCI(lock core_locking.Lock, policyCheckerProvider core_policy.PolicyCh
241241
prBranchName, _, err := githubPrService.GetBranchName(*commentEvent.Issue.Number)
242242

243243
if err != nil {
244-
usage.ReportErrorAndExit(githubActor, fmt.Sprintf("Error while retriving default branch from Issue: %v", err), 6)
244+
usage.ReportErrorAndExit(githubActor, fmt.Sprintf("Error while retrieving default branch from Issue: %v", err), 6)
245245
}
246246
defaultBranch := *commentEvent.Repo.DefaultBranch
247247
repoFullName := *commentEvent.Repo.FullName
@@ -294,7 +294,7 @@ func GitHubCI(lock core_locking.Lock, policyCheckerProvider core_policy.PolicyCh
294294
}
295295

296296
if allAppliesSuccessful {
297-
// aggreate status checks: success
297+
// aggregate status checks: success
298298
if scheduler.IsPlanJobs(jobs) {
299299
githubPrService.SetStatus(prNumber, "success", "digger/plan")
300300
} else {

dgctl/cmd/exec.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,15 @@ func GetWorkflowIdAndUrlFromDiggerJobId(client *github.Client, repoOwner string,
161161

162162
func cleanupDiggerOutput(output string) string {
163163

164-
startingDelimeter := "<========= DIGGER RUNNING IN MANUAL MODE =========>"
164+
startingDelimiter := "<========= DIGGER RUNNING IN MANUAL MODE =========>"
165165
endingDelimiter := "<========= DIGGER COMPLETED =========>"
166166

167167
startPos := 0
168168
endPos := len(output)
169169
// removes output of terraform -version command that terraform-exec executes on every run
170-
i := strings.Index(output, startingDelimeter)
170+
i := strings.Index(output, startingDelimiter)
171171
if i != -1 {
172-
startPos = i + len(startingDelimeter)
172+
startPos = i + len(startingDelimiter)
173173
}
174174

175175
e := strings.Index(output, endingDelimiter)

docs/ce/azure-specific/azure.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111

112112
Just make any change to Terraform - like add a blank line
113113

114-
An action should start. After some time you should see a comment of lock being aquired in your PR. Something like this:
114+
An action should start. After some time you should see a comment of lock being acquired in your PR. Something like this:
115115

116116
```
117117
Project diggerhq/azure-onboarding-test#infra-prod has been locked by PR #1

0 commit comments

Comments
 (0)