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

+12-12
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+5-5
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

+3-3
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

+1-1
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

docs/ce/cloud-providers/aws.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Setting up DynamoDB Access for locks"
3-
description: "Digger runs without a backend but uses a DynamoDB table to keep track of all the locks that are necessary for locking PR projects. On the first run in your AWS account digger checks for the presense of `DiggerDynamoDBLockTable` and it requires the following policy for the DynamoDB access:"
3+
description: "Digger runs without a backend but uses a DynamoDB table to keep track of all the locks that are necessary for locking PR projects. On the first run in your AWS account digger checks for the presence of `DiggerDynamoDBLockTable` and it requires the following policy for the DynamoDB access:"
44
---
55

66
```

docs/ce/gcp/federated-oidc-access.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Create 2 secrets in your Action Secrets with the following names:
5353

5454
## 5\. Configure Digger workflow to use federated access
5555

56-
Set `EXT` env var intead of the usual key pair. See [oidc-gcp-example](https://github.com/diggerhq/digger-gcp-ocid-demo) repo for more detail. Sample config below:
56+
Set `EXT` env var instead of the usual key pair. See [oidc-gcp-example](https://github.com/diggerhq/digger-gcp-ocid-demo) repo for more detail. Sample config below:
5757

5858
```
5959
- id: 'auth'

docs/ce/howto/apply-requirements.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Digger currently does not support `apply_requirements` (like in Atlantis). Comin
77
## Workaround
88

99
You can use mergeability requirements together with Status Checks to achieve the same.
10-
Digger will not apply if the pull request is not in a “mergable” state as specified by GitHub api. This means that if you have a separate status check and you have this check as “required” by branch protection rules then an attempt of digger apply will not go ahead.
10+
Digger will not apply if the pull request is not in a “mergeable” state as specified by GitHub api. This means that if you have a separate status check and you have this check as “required” by branch protection rules then an attempt of digger apply will not go ahead.

docs/ce/howto/generate-projects.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ This will create a project for all sub-directories under environments/core. If s
4545

4646
# Blocks syntax with Terragrunt
4747

48-
You can use blocks generation with terragrunt as well. In order to acheive this all you need to do is specify
48+
You can use blocks generation with terragrunt as well. In order to achieve this all you need to do is specify
4949
`terragrunt: true` for each block. Normally you would only have one terragrunt structure and so you will have
5050
one block entry. However you may be also interested to specify different structure and different parameters
51-
for different folders. For example, you may have a dev, staging and prod account heirarchy and therefore you
51+
for different folders. For example, you may have a dev, staging and prod account hierarchy and therefore you
5252
would specify the blocks in that way. Alternatively maybe you have different providers and you would like to
5353
specify those different providers as well. Note that for very large terragrunt monorepos segragating by blocks
5454
will lead to improved performance since it will not unnecessarily traverse an entire tree if no files have been

docs/ce/howto/project-level-roles.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ title: "Project Level Roles for AWS"
33
---
44

55
Multi-account setups are pretty common. In many cases you want to use a different account for
6-
different sets of projects. If you wish to acheive this outside of digger and only use profile names and set
6+
different sets of projects. If you wish to achieve this outside of digger and only use profile names and set
77
them directly in terraform you can use this as an [example repository](https://github.com/diggerhq/demo-assume-role-multi-account-aws)
88

99
You can also use digger.yml to specify which roles should be used for which repository. In this case you specify a main
1010
role in the workflow file using `aws-role-to-assume` (or using keys) and inside the repo if you wish to assume
11-
a differnt role for a specific project you specify an `aws_role_to_assume` under that project.
11+
a different role for a specific project you specify an `aws_role_to_assume` under that project.
1212
If you only specify one role (either `state` or `command`) it is assumed that both options are the same role.
1313

1414
Example digger.yml:
@@ -27,7 +27,7 @@ projects:
2727
command: "arn:/blabla/accid/prodaccount"
2828
```
2929

30-
Using a workflow file as usual. Here is an [example repository](https://github.com/diggerhq/demo-assume-role-multi-account-aws_diggeryml) using digger.yml to assume differnt roles for differnt projects.
30+
Using a workflow file as usual. Here is an [example repository](https://github.com/diggerhq/demo-assume-role-multi-account-aws_diggeryml) using digger.yml to assume different roles for different projects.
3131

3232
<Note>
3333
NOTE: for locking to be configured user needs to also pass aws-role-to-assume in the workflow file as a

docs/ce/howto/using-infracost.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ After the pipeline run finishes, you should see Infracost breakdown output appen
4545

4646
## Diff
4747

48-
For `infracost diff` we'd need to run Infracost twice: first to generate the breakdown on the main branch, then to generate diff on the PR branch. To help with that, Digger provides additional environment varialbes like `$PROJECT_NAME` and `$PR_BRANCH` (see [custom commands](/ce/howto/custom-commands)). You can then configure your workflow in digger.yml to switch branch to main, generate base breakdown, switch back to PR branch, generate diff and finally show it via `$DIGGER_OUT`, like below:
48+
For `infracost diff` we'd need to run Infracost twice: first to generate the breakdown on the main branch, then to generate diff on the PR branch. To help with that, Digger provides additional environment variables like `$PROJECT_NAME` and `$PR_BRANCH` (see [custom commands](/ce/howto/custom-commands)). You can then configure your workflow in digger.yml to switch branch to main, generate base breakdown, switch back to PR branch, generate diff and finally show it via `$DIGGER_OUT`, like below:
4949

5050
```
5151
steps:

docs/ce/howto/using-terragrunt.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ This will perform a `terragrunt apply` after changes are detected within this di
2525
# Dynamically generating Terragrunt projects
2626

2727
<Note>
28-
This is not the prefered way of generating terragrunt projects and we advise you to instead use the [blocks declarative](/ce/howto/generate-projects#blocks-syntax-with-terragrunt)
29-
since this way may be depracated in the future
28+
This is not the preferred way of generating terragrunt projects and we advise you to instead use the [blocks declarative](/ce/howto/generate-projects#blocks-syntax-with-terragrunt)
29+
since this way may be deprecated in the future
3030
</Note>
3131

3232
[Demo repo](https://github.com/diggerhq/test-terragrunt-racecondition)

docs/ce/securing-digger/external-provider.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "External providers code execution"
33
---
44

55
Digger executes terraform in github actions within previlliged environments. Since terraform has the ability
6-
to execute arbitrary code based on data blocks or external providers this can lead to a user with mallicious
6+
to execute arbitrary code based on data blocks or external providers this can lead to a user with malicious
77
intent to expose the environment variables within the CI environment, potentially leaking cloud secrets.
88

99
How to avoid this?

docs/ee/buildkite.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ BUILDKITE_ORG=myorg
2626
BUILDKITE_PIPELINE=my_digger_pipeline
2727
```
2828

29-
Other than that if you folllow the steps in the self hosting guide you should end up with the orchestrator up and running
29+
Other than that if you follow the steps in the self hosting guide you should end up with the orchestrator up and running
3030
along with a github app successfully installed. The repo you wish to try with digger should be installed onto the orchestrator.
3131

3232
### Install digger cli in your buildkite agent

docs/ee/gitlab-support.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can use digger with gitlab as your VCS and gitlab pipelines as a CI backend.
99

1010
- Having a valid digger EE license key. If you don't have a license key please [contact us](https://calendly.com/diggerdev/diggerdemo) to request an EE trial
1111
- A gitlab account.
12-
- a personal github access token. This can be created from user prefences > access tokens
12+
- a personal github access token. This can be created from user preferences > access tokens
1313

1414
### Install the digger EE orchestrator:
1515

@@ -27,7 +27,7 @@ DIGGER_GITLAB_WEBHOOK_SECRET=abc123
2727
DIGGER_GITLAB_ACCESS_TOKEN=glpat-xxxxyyyyyzzzzz # (this is your gitlab access token from prerequisite step)
2828
```
2929

30-
Other than that if you folllow the steps in the self hosting guide you should end up with the orchestrator up and running
30+
Other than that if you follow the steps in the self hosting guide you should end up with the orchestrator up and running
3131
along with a github app successfully installed. The repo you wish to try with digger should be installed onto the orchestrator.
3232

3333

ee/backend/ci_backends/provider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ func (b EEBackendProvider) GetCiBackend(options ci_backends.CiBackendOptions) (c
5555
ciBackend := &BuildkiteCi{Org: org, Pipeline: pipeline, Client: *buildkite}
5656
return ciBackend, nil
5757
}
58-
return nil, fmt.Errorf("unkown ci system: %v", ciBackendType)
58+
return nil, fmt.Errorf("unknown ci system: %v", ciBackendType)
5959
}

0 commit comments

Comments
 (0)