+
Skip to content

Add default branch to repository edit event #2995

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

Merged
merged 4 commits into from
Nov 22, 2023
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
16 changes: 11 additions & 5 deletions github/event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,12 @@ type GollumEvent struct {
// EditChange represents the changes when an issue, pull request, comment,
// or repository has been edited.
type EditChange struct {
Title *EditTitle `json:"title,omitempty"`
Body *EditBody `json:"body,omitempty"`
Base *EditBase `json:"base,omitempty"`
Repo *EditRepo `json:"repository,omitempty"`
Owner *EditOwner `json:"owner,omitempty"`
Title *EditTitle `json:"title,omitempty"`
Body *EditBody `json:"body,omitempty"`
Base *EditBase `json:"base,omitempty"`
Repo *EditRepo `json:"repository,omitempty"`
Owner *EditOwner `json:"owner,omitempty"`
DefaultBranch *EditDefaultBranch `json:"default_branch,omitempty"`
}

// EditTitle represents a pull-request title change.
Expand Down Expand Up @@ -442,6 +443,11 @@ type EditSHA struct {
From *string `json:"from,omitempty"`
}

// EditDefaultBranch represents a change of repository's default branch name.
type EditDefaultBranch struct {
From *string `json:"from,omitempty"`
}

// ProjectChange represents the changes when a project has been edited.
type ProjectChange struct {
Name *ProjectName `json:"name,omitempty"`
Expand Down
16 changes: 16 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载