Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add WebCommitSignoffRequired field #115

Merged
merged 4 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ module github.com/sigstore/github-sync

go 1.21

toolchain go1.21.1

require (
github.com/bmatcuk/doublestar/v3 v3.0.0
github.com/pulumi/pulumi-github/sdk/v5 v5.25.0
github.com/pulumi/pulumi-github/sdk/v5 v5.26.0
github.com/pulumi/pulumi/sdk/v3 v3.102.0
sigs.k8s.io/yaml v1.4.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE=
github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw=
github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k=
github.com/pulumi/pulumi-github/sdk/v5 v5.25.0 h1:rAcZTvifSXMSfJPXI/V3vYRgEd8FEb9TdSDBMmWev0s=
github.com/pulumi/pulumi-github/sdk/v5 v5.25.0/go.mod h1:fIFVBtWcNC/nzpax9z2LvjsgBdx+hSjx4+p0bcRerT4=
github.com/pulumi/pulumi-github/sdk/v5 v5.26.0 h1:EfBWHimefvHfgyucGfiN1T0x2MR1jf1513IPzLMi+xM=
github.com/pulumi/pulumi-github/sdk/v5 v5.26.0/go.mod h1:6711hFgixjeEkcP2mV5HuXAJ5Pw55kEymLZ/PdeldbI=
github.com/pulumi/pulumi/sdk/v3 v3.102.0 h1:r5mKh7twIjoDhVFxm2HNQyXYmxsffm2J7YJd5KWCguM=
github.com/pulumi/pulumi/sdk/v3 v3.102.0/go.mod h1:Ml3rpGfyZlI4zQCG7LN2XDSmH4XUNYdyBwJ3yEr/OpI=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
Expand Down
38 changes: 19 additions & 19 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,25 @@ func main() {
for _, repo := range p.Config.Repositories {
// sync repos
repoSync := &github.RepositoryArgs{
Name: pulumi.String(repo.Name),
Description: pulumi.String(repo.Description),
HomepageUrl: pulumi.String(repo.HomepageURL),
AllowAutoMerge: pulumi.Bool(repo.AllowAutoMerge),
AllowMergeCommit: pulumi.Bool(repo.AllowMergeCommit),
AllowRebaseMerge: pulumi.Bool(repo.AllowRebaseMerge),
AllowSquashMerge: pulumi.Bool(repo.AllowSquashMerge),
AutoInit: pulumi.Bool(repo.AutoInit),
DeleteBranchOnMerge: pulumi.Bool(repo.DeleteBranchOnMerge),
HasDiscussions: pulumi.Bool(repo.HasDiscussions),
HasDownloads: pulumi.Bool(repo.HasDownloads),
HasIssues: pulumi.Bool(repo.HasIssues),
HasProjects: pulumi.Bool(repo.HasProjects),
HasWiki: pulumi.Bool(repo.HasWiki),
LicenseTemplate: pulumi.String(repo.LicenseTemplate),
Topics: pulumi.ToStringArray(repo.Topics),
VulnerabilityAlerts: pulumi.Bool(repo.VulnerabilityAlerts),
Visibility: pulumi.String(repo.Visibility),
IsTemplate: pulumi.Bool(repo.IsTemplate),
Name: pulumi.String(repo.Name),
Description: pulumi.String(repo.Description),
HomepageUrl: pulumi.String(repo.HomepageURL),
AllowAutoMerge: pulumi.Bool(repo.AllowAutoMerge),
AllowMergeCommit: pulumi.Bool(repo.AllowMergeCommit),
AllowRebaseMerge: pulumi.Bool(repo.AllowRebaseMerge),
AllowSquashMerge: pulumi.Bool(repo.AllowSquashMerge),
AutoInit: pulumi.Bool(repo.AutoInit),
DeleteBranchOnMerge: pulumi.Bool(repo.DeleteBranchOnMerge),
HasDownloads: pulumi.Bool(repo.HasDownloads),
HasIssues: pulumi.Bool(repo.HasIssues),
HasProjects: pulumi.Bool(repo.HasProjects),
HasWiki: pulumi.Bool(repo.HasWiki),
LicenseTemplate: pulumi.String(repo.LicenseTemplate),
Topics: pulumi.ToStringArray(repo.Topics),
VulnerabilityAlerts: pulumi.Bool(repo.VulnerabilityAlerts),
Visibility: pulumi.String(repo.Visibility),
IsTemplate: pulumi.Bool(repo.IsTemplate),
WebCommitSignoffRequired: pulumi.Bool(repo.WebCommitSignoffRequired),
}

if repo.Pages.Branch != "" {
Expand Down
54 changes: 27 additions & 27 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,33 @@ type Team struct {
}

type Repository struct {
AllowAutoMerge bool `yaml:"allowAutoMerge"`
AllowMergeCommit bool `yaml:"allowMergeCommit"`
AllowRebaseMerge bool `yaml:"allowRebaseMerge"`
AllowSquashMerge bool `yaml:"allowSquashMerge"`
Archived bool `yaml:"archived"`
AutoInit bool `yaml:"autoInit"`
DeleteBranchOnMerge bool `yaml:"deleteBranchOnMerge"`
HasDiscussions bool `yaml:"hasDiscussions"`
HasDownloads bool `yaml:"hasDownloads"`
HasIssues bool `yaml:"hasIssues"`
HasProjects bool `yaml:"hasProjects"`
HasWiki bool `yaml:"hasWiki"`
VulnerabilityAlerts bool `yaml:"vulnerabilityAlerts"`
DefaultBranch string `yaml:"defaultBranch"`
Visibility string `yaml:"visibility"`
Name string `yaml:"name"`
Owner string `yaml:"owner"`
Description string `yaml:"description"`
HomepageURL string `yaml:"homepageUrl"`
LicenseTemplate string `yaml:"licenseTemplate"`
Topics []string `yaml:"topics"`
Pages Pages `yaml:"pages"`
IsTemplate bool `yaml:"isTemplate"`
Template Template `yaml:"template"`
Collaborators []Collaborator `yaml:"collaborators"`
Teams []RepoTeam `yaml:"teams"`
BranchesProtection []BranchProtection `yaml:"branchProtection"`
AllowAutoMerge bool `yaml:"allowAutoMerge"`
AllowMergeCommit bool `yaml:"allowMergeCommit"`
AllowRebaseMerge bool `yaml:"allowRebaseMerge"`
AllowSquashMerge bool `yaml:"allowSquashMerge"`
Archived bool `yaml:"archived"`
AutoInit bool `yaml:"autoInit"`
DeleteBranchOnMerge bool `yaml:"deleteBranchOnMerge"`
HasDownloads bool `yaml:"hasDownloads"`
HasIssues bool `yaml:"hasIssues"`
HasProjects bool `yaml:"hasProjects"`
HasWiki bool `yaml:"hasWiki"`
VulnerabilityAlerts bool `yaml:"vulnerabilityAlerts"`
DefaultBranch string `yaml:"defaultBranch"`
Visibility string `yaml:"visibility"`
Name string `yaml:"name"`
Owner string `yaml:"owner"`
Description string `yaml:"description"`
HomepageURL string `yaml:"homepageUrl"`
LicenseTemplate string `yaml:"licenseTemplate"`
Topics []string `yaml:"topics"`
Pages Pages `yaml:"pages"`
IsTemplate bool `yaml:"isTemplate"`
Template Template `yaml:"template"`
Collaborators []Collaborator `yaml:"collaborators"`
Teams []RepoTeam `yaml:"teams"`
BranchesProtection []BranchProtection `yaml:"branchProtection"`
WebCommitSignoffRequired bool `yaml:"webCommitSignoffRequired"`
}

type Pages struct {
Expand Down
Loading