Skip to content

Commit 4b47dc3

Browse files
author
Chris Vermeulen
authored
Merge pull request #1 from compliance-framework/chore-update-to-american-spelling
Update to American spelling for organization
2 parents 1ed096a + 1a93308 commit 4b47dc3

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

main.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
type PluginConfig struct {
1717
Token string `mapstructure:"token"`
18-
Organisation *string `mapstructure:"organisation"`
18+
Organization *string `mapstructure:"organization"`
1919
User *string `mapstructure:"user"`
2020
}
2121

@@ -114,7 +114,7 @@ func (l *DependabotPlugin) FetchRepositories(ctx context.Context) (<-chan *githu
114114
done := false
115115
for !done {
116116
l.logger.Trace("Fetching repositories from Github API")
117-
repos, _, err := l.githubClient.Repositories.ListByOrg(ctx, *l.config.Organisation, &github.RepositoryListByOrgOptions{
117+
repos, _, err := l.githubClient.Repositories.ListByOrg(ctx, *l.config.Organization, &github.RepositoryListByOrgOptions{
118118
ListOptions: github.ListOptions{
119119
Page: page,
120120
},
@@ -162,7 +162,7 @@ func (l *DependabotPlugin) EvaluatePolicies(ctx context.Context, repo *github.Re
162162
"provider": "github",
163163
"type": "repository",
164164
"repository-name": repo.GetName(),
165-
"organisation": repo.GetOwner().GetLogin(),
165+
"organization": repo.GetOwner().GetLogin(),
166166
"url": repo.GetURL(),
167167
},
168168
Title: policyManager.Pointer("Software Repository"),
@@ -180,24 +180,24 @@ func (l *DependabotPlugin) EvaluatePolicies(ctx context.Context, repo *github.Re
180180
},
181181
},
182182
{
183-
Type: "software-organisation",
183+
Type: "software-organization",
184184
Attributes: map[string]string{
185185
"provider": "github",
186-
"type": "organisation",
187-
"organisation-name": repo.GetOrganization().GetName(),
188-
"organisation-path": repo.GetOrganization().GetLogin(),
186+
"type": "organization",
187+
"organization-name": repo.GetOrganization().GetName(),
188+
"organization-path": repo.GetOrganization().GetLogin(),
189189
},
190-
Title: policyManager.Pointer("Software Organisation"),
190+
Title: policyManager.Pointer("Software Organization"),
191191
Props: []*proto.Property{
192192
{
193-
Name: "organisation",
193+
Name: "organization",
194194
Value: repo.GetOrganization().GetName(),
195195
},
196196
},
197197
Links: []*proto.Link{
198198
{
199199
Href: repo.GetOrganization().GetURL(),
200-
Text: policyManager.Pointer("Organisation URL"),
200+
Text: policyManager.Pointer("Organization URL"),
201201
},
202202
},
203203
},

main_integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func TestDependabotPlugin_Integration_FetchRepositories(t *testing.T) {
1919
logger: hclog.NewNullLogger(),
2020
config: &PluginConfig{
2121
Token: os.Getenv("GITHUB_TOKEN"),
22-
Organisation: policy_manager.Pointer("compliance-framework"),
22+
Organization: policy_manager.Pointer("compliance-framework"),
2323
},
2424
githubClient: github.NewClient(nil).WithAuthToken(os.Getenv("GITHUB_TOKEN")),
2525
}
@@ -59,7 +59,7 @@ func TestDependabotPlugin_Integration_FetchRepositoryDependabotAlerts(t *testing
5959
}),
6060
config: &PluginConfig{
6161
Token: os.Getenv("GITHUB_TOKEN"),
62-
Organisation: policy_manager.Pointer("compliance-framework"),
62+
Organization: policy_manager.Pointer("compliance-framework"),
6363
},
6464
githubClient: github.NewClient(nil).WithAuthToken(os.Getenv("GITHUB_TOKEN")),
6565
}

0 commit comments

Comments
 (0)