Repository: google/go-github
Pull request #2310 (2022-03-02 19:36:59)

Move examples dir into its own Go module
We (in particular shoutout to @asvoboda for noticing this in https://github.com/bradleyfalzon/ghinstallation/pull/63)
 noticed that go-github has an example that references ghinstallation,
which causes a circular module dependency. While this is technically
fine (https://go.dev/ref/mod#minimal-version-selection should resolve
it), there's probably not a strong reason to pull in ghinstallation and
other example dependencies not needed by the core github package unless
it is strictly needed.

This just breaks the example folder into its own module so that users
can import the core go-github package with the minimal set of
dependencies. This should not affect any functionality.
I tried to keep versions roughly the same for compatibility, though
replaced the go-github dependency with the parent to try and keep
examples up-to-date with HEAD (this could possibly be replaced with
https://go.dev/ref/mod#workspaces later).

codecov[bot]: # [Codecov](https://codecov.io/gh/google/go-github/pull/2310?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) Report
> Merging [#2310](https://codecov.io/gh/google/go-github/pull/2310?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) (ce17c3f) into [master](https://codecov.io/gh/google/go-github/commit/2a15bc2a98308563935bdd5baf37d2f1dcd53b07?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) (2a15bc2) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/google/go-github/pull/2310/graphs/tree.svg?width=650&height=150&src=pr&token=EgYjGjZlI0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google)](https://codecov.io/gh/google/go-github/pull/2310?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google)

```diff
@@           Coverage Diff           @@
##           master    #2310   +/-   ##
=======================================
  Coverage   97.84%   97.84%           
=======================================
  Files         115      115           
  Lines       10403    10403           
=======================================
  Hits        10179    10179           
  Misses        156      156           
  Partials       68       68           
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/google/go-github/pull/2310?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/google/go-github/pull/2310?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google). Last update [2a15bc2...ce17c3f](https://codecov.io/gh/google/go-github/pull/2310?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google).


Patch:
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index 7a3453eb..414f210b 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -10,7 +10,7 @@ jobs:
     runs-on: ${{ matrix.platform }}
 
     steps:
-    - uses: actions/checkout@v2
+    - uses: actions/checkout@v3
 
     - name: golangci-lint
       uses: golangci/golangci-lint-action@b517f99ae23d86ecc4c0dec08dcf48d2336abc29 #v2.5.2
diff --git a/example/go.mod b/example/go.mod
new file mode 100644
index 00000000..5c52f5fd
--- /dev/null
+++ b/example/go.mod
@@ -0,0 +1,24 @@
+module github.com/google/go-github/example
+
+go 1.17
+
+require (
+	github.com/bradleyfalzon/ghinstallation/v2 v2.0.4
+	github.com/google/go-github/v43 v43.0.0
+	golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
+	golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
+	google.golang.org/appengine v1.6.7
+)
+
+require (
+	github.com/golang-jwt/jwt/v4 v4.0.0 // indirect
+	github.com/golang/protobuf v1.3.2 // indirect
+	github.com/google/go-github/v41 v41.0.0 // indirect
+	github.com/google/go-querystring v1.1.0 // indirect
+	golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
+	golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
+	golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
+)
+
+// Use version at HEAD, not the latest published.
+replace github.com/google/go-github/v43 => ../
diff --git a/example/go.sum b/example/go.sum
new file mode 100644
index 00000000..22a22258
--- /dev/null
+++ b/example/go.sum
@@ -0,0 +1,36 @@
+github.com/bradleyfalzon/ghinstallation/v2 v2.0.4 h1:tXKVfhE7FcSkhkv0UwkLvPDeZ4kz6OXd0PKPlFqf81M=
+github.com/bradleyfalzon/ghinstallation/v2 v2.0.4/go.mod h1:B40qPqJxWE0jDZgOR1JmaMy+4AY1eBP+IByOvqyAKp0=
+github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o=
+github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
+github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/go-github/v41 v41.0.0 h1:HseJrM2JFf2vfiZJ8anY2hqBjdfY1Vlj/K27ueww4gg=
+github.com/google/go-github/v41 v41.0.0/go.mod h1:XgmCA5H323A9rtgExdTcnDkcqp6S30AVACCBDOonIxg=
+github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
+github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ=
+golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
+google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
diff --git a/github/code-scanning.go b/github/code-scanning.go
index 9616f3a2..e09964ba 100644
--- a/github/code-scanning.go
+++ b/github/code-scanning.go
@@ -67,22 +67,26 @@ type Tool struct {
 //
 // GitHub API docs: https://docs.github.com/en/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository
 type Alert struct {
-	RuleID             *string             `json:"rule_id,omitempty"`
-	RuleSeverity       *string             `json:"rule_severity,omitempty"`
-	RuleDescription    *string             `json:"rule_description,omitempty"`
-	Rule               *Rule               `json:"rule,omitempty"`
-	Tool               *Tool               `json:"tool,omitempty"`
-	CreatedAt          *Timestamp          `json:"created_at,omitempty"`
-	State              *string             `json:"state,omitempty"`
-	ClosedBy           *User               `json:"closed_by,omitempty"`
-	ClosedAt           *Timestamp          `json:"closed_at,omitempty"`
-	URL                *string             `json:"url,omitempty"`
-	HTMLURL            *string             `json:"html_url,omitempty"`
-	MostRecentInstance *MostRecentInstance `json:"most_recent_instance,omitempty"`
-	DismissedBy        *User               `json:"dismissed_by,omitempty"`
-	DismissedAt        *Timestamp          `json:"dismissed_at,omitempty"`
-	DismissedReason    *string             `json:"dismissed_reason,omitempty"`
-	InstancesURL       *string             `json:"instances_url,omitempty"`
+	Number             *int                  `json:"number,omitempty"`
+	RuleID             *string               `json:"rule_id,omitempty"`
+	RuleSeverity       *string               `json:"rule_severity,omitempty"`
+	RuleDescription    *string               `json:"rule_description,omitempty"`
+	Rule               *Rule                 `json:"rule,omitempty"`
+	Tool               *Tool                 `json:"tool,omitempty"`
+	CreatedAt          *Timestamp            `json:"created_at,omitempty"`
+	UpdatedAt          *Timestamp            `json:"updated_at,omitempty"`
+	FixedAt            *Timestamp            `json:"fixed_at,omitempty"`
+	State              *string               `json:"state,omitempty"`
+	ClosedBy           *User                 `json:"closed_by,omitempty"`
+	ClosedAt           *Timestamp            `json:"closed_at,omitempty"`
+	URL                *string               `json:"url,omitempty"`
+	HTMLURL            *string               `json:"html_url,omitempty"`
+	MostRecentInstance *MostRecentInstance   `json:"most_recent_instance,omitempty"`
+	Instances          []*MostRecentInstance `json:"instances,omitempty"`
+	DismissedBy        *User                 `json:"dismissed_by,omitempty"`
+	DismissedAt        *Timestamp            `json:"dismissed_at,omitempty"`
+	DismissedReason    *string               `json:"dismissed_reason,omitempty"`
+	InstancesURL       *string               `json:"instances_url,omitempty"`
 }
 
 // ID returns the ID associated with an alert. It is the number at the end of the security alert's URL.
diff --git a/github/event_types.go b/github/event_types.go
index c940ec8f..de729c06 100644
--- a/github/event_types.go
+++ b/github/event_types.go
@@ -1248,3 +1248,71 @@ type WorkflowRunEvent struct {
 	Sender       *User         `json:"sender,omitempty"`
 	Installation *Installation `json:"installation,omitempty"`
 }
+
+// SecurityAdvisory represents the advisory object in SecurityAdvisoryEvent payload.
+//
+// GitHub API docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#security_advisory
+type SecurityAdvisory struct {
+	GHSAID          *string                  `json:"ghsa_id,omitempty"`
+	Summary         *string                  `json:"summary,omitempty"`
+	Description     *string                  `json:"description,omitempty"`
+	Severity        *string                  `json:"severity,omitempty"`
+	Identifiers     []*AdvisoryIdentifier    `json:"identifiers,omitempty"`
+	References      []*AdvisoryReference     `json:"references,omitempty"`
+	PublishedAt     *Timestamp               `json:"published_at,omitempty"`
+	UpdatedAt       *Timestamp               `json:"updated_at,omitempty"`
+	WithdrawnAt     *Timestamp               `json:"withdrawn_at,omitempty"`
+	Vulnerabilities []*AdvisoryVulnerability `json:"vulnerabilities,omitempty"`
+}
+
+// AdvisoryIdentifier represents the identifier for a Security Advisory.
+type AdvisoryIdentifier struct {
+	Value *string `json:"value,omitempty"`
+	Type  *string `json:"type,omitempty"`
+}
+
+// AdvisoryReference represents the reference url for the security advisory.
+type AdvisoryReference struct {
+	URL *string `json:"url,omitempty"`
+}
+
+// AdvisoryVulnerability represents the vulnerability object for a Security Advisory.
+type AdvisoryVulnerability struct {
+	Package                *VulnerabilityPackage `json:"package,omitempty"`
+	Severity               *string               `json:"severity,omitempty"`
+	VulnerableVersionRange *string               `json:"vulnerable_version_range,omitempty"`
+	FirstPatchedVersion    *FirstPatchedVersion  `json:"first_patched_version,omitempty"`
+}
+
+// VulnerabilityPackage represents the package object for an Advisory Vulnerability.
+type VulnerabilityPackage struct {
+	Ecosystem *string `json:"ecosystem,omitempty"`
+	Name      *string `json:"name,omitempty"`
+}
+
+// FirstPatchedVersion represents the identifier for the first patched version of that vulnerability.
+type FirstPatchedVersion struct {
+	Identifier *string `json:"identifier,omitempty"`
+}
+
+// SecurityAdvisoryEvent is triggered when a security-related vulnerability is found in software on GitHub.
+//
+// GitHub API docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#security_advisory
+type SecurityAdvisoryEvent struct {
+	Action           *string           `json:"action,omitempty"`
+	SecurityAdvisory *SecurityAdvisory `json:"security_advisory,omitempty"`
+}
+
+// CodeScanningAlertEvent is triggered when a code scanning finds a potential vulnerability or error in your code.
+//
+// GitHub API docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#code_scanning_alert
+type CodeScanningAlertEvent struct {
+	Action *string `json:"action,omitempty"`
+	Alert  *Alert  `json:"alert,omitempty"`
+	Ref    *string `json:"ref,omitempty"`
+	// CommitOID is the commit SHA of the code scanning alert
+	CommitOID *string       `json:"commit_oid,omitempty"`
+	Repo      *Repository   `json:"repository,omitempty"`
+	Org       *Organization `json:"organization,omitempty"`
+	Sender    *User         `json:"sender,omitempty"`
+}
diff --git a/github/github-accessors.go b/github/github-accessors.go
index 6c13f545..c87c251f 100644
--- a/github/github-accessors.go
+++ b/github/github-accessors.go
@@ -172,6 +172,62 @@ func (a *AdvancedSecurityCommittersBreakdown) GetUserLogin() string {
 	return *a.UserLogin
 }
 
+// GetType returns the Type field if it's non-nil, zero value otherwise.
+func (a *AdvisoryIdentifier) GetType() string {
+	if a == nil || a.Type == nil {
+		return ""
+	}
+	return *a.Type
+}
+
+// GetValue returns the Value field if it's non-nil, zero value otherwise.
+func (a *AdvisoryIdentifier) GetValue() string {
+	if a == nil || a.Value == nil {
+		return ""
+	}
+	return *a.Value
+}
+
+// GetURL returns the URL field if it's non-nil, zero value otherwise.
+func (a *AdvisoryReference) GetURL() string {
+	if a == nil || a.URL == nil {
+		return ""
+	}
+	return *a.URL
+}
+
+// GetFirstPatchedVersion returns the FirstPatchedVersion field.
+func (a *AdvisoryVulnerability) GetFirstPatchedVersion() *FirstPatchedVersion {
+	if a == nil {
+		return nil
+	}
+	return a.FirstPatchedVersion
+}
+
+// GetPackage returns the Package field.
+func (a *AdvisoryVulnerability) GetPackage() *VulnerabilityPackage {
+	if a == nil {
+		return nil
+	}
+	return a.Package
+}
+
+// GetSeverity returns the Severity field if it's non-nil, zero value otherwise.
+func (a *AdvisoryVulnerability) GetSeverity() string {
+	if a == nil || a.Severity == nil {
+		return ""
+	}
+	return *a.Severity
+}
+
+// GetVulnerableVersionRange returns the VulnerableVersionRange field if it's non-nil, zero value otherwise.
+func (a *AdvisoryVulnerability) GetVulnerableVersionRange() string {
+	if a == nil || a.VulnerableVersionRange == nil {
+		return ""
+	}
+	return *a.VulnerableVersionRange
+}
+
 // GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise.
 func (a *Alert) GetClosedAt() Timestamp {
 	if a == nil || a.ClosedAt == nil {
@@ -220,6 +276,14 @@ func (a *Alert) GetDismissedReason() string {
 	return *a.DismissedReason
 }
 
+// GetFixedAt returns the FixedAt field if it's non-nil, zero value otherwise.
+func (a *Alert) GetFixedAt() Timestamp {
+	if a == nil || a.FixedAt == nil {
+		return Timestamp{}
+	}
+	return *a.FixedAt
+}
+
 // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise.
 func (a *Alert) GetHTMLURL() string {
 	if a == nil || a.HTMLURL == nil {
@@ -244,6 +308,14 @@ func (a *Alert) GetMostRecentInstance() *MostRecentInstance {
 	return a.MostRecentInstance
 }
 
+// GetNumber returns the Number field if it's non-nil, zero value otherwise.
+func (a *Alert) GetNumber() int {
+	if a == nil || a.Number == nil {
+		return 0
+	}
+	return *a.Number
+}
+
 // GetRule returns the Rule field.
 func (a *Alert) GetRule() *Rule {
 	if a == nil {
@@ -292,6 +364,14 @@ func (a *Alert) GetTool() *Tool {
 	return a.Tool
 }
 
+// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
+func (a *Alert) GetUpdatedAt() Timestamp {
+	if a == nil || a.UpdatedAt == nil {
+		return Timestamp{}
+	}
+	return *a.UpdatedAt
+}
+
 // GetURL returns the URL field if it's non-nil, zero value otherwise.
 func (a *Alert) GetURL() string {
 	if a == nil || a.URL == nil {
@@ -2212,6 +2292,62 @@ func (c *CodeResult) GetSHA() string {
 	return *c.SHA
 }
 
+// GetAction returns the Action field if it's non-nil, zero value otherwise.
+func (c *CodeScanningAlertEvent) GetAction() string {
+	if c == nil || c.Action == nil {
+		return ""
+	}
+	return *c.Action
+}
+
+// GetAlert returns the Alert field.
+func (c *CodeScanningAlertEvent) GetAlert() *Alert {
+	if c == nil {
+		return nil
+	}
+	return c.Alert
+}
+
+// GetCommitOID returns the CommitOID field if it's non-nil, zero value otherwise.
+func (c *CodeScanningAlertEvent) GetCommitOID() string {
+	if c == nil || c.CommitOID == nil {
+		return ""
+	}
+	return *c.CommitOID
+}
+
+// GetOrg returns the Org field.
+func (c *CodeScanningAlertEvent) GetOrg() *Organization {
+	if c == nil {
+		return nil
+	}
+	return c.Org
+}
+
+// GetRef returns the Ref field if it's non-nil, zero value otherwise.
+func (c *CodeScanningAlertEvent) GetRef() string {
+	if c == nil || c.Ref == nil {
+		return ""
+	}
+	return *c.Ref
+}
+
+// GetRepo returns the Repo field.
+func (c *CodeScanningAlertEvent) GetRepo() *Repository {
+	if c == nil {
+		return nil
+	}
+	return c.Repo
+}
+
+// GetSender returns the Sender field.
+func (c *CodeScanningAlertEvent) GetSender() *User {
+	if c == nil {
+		return nil
+	}
+	return c.Sender
+}
+
 // GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise.
 func (c *CodeSearchResult) GetIncompleteResults() bool {
 	if c == nil || c.IncompleteResults == nil {
@@ -4932,6 +5068,14 @@ func (f *Feeds) GetUserURL() string {
 	return *f.UserURL
 }
 
+// GetIdentifier returns the Identifier field if it's non-nil, zero value otherwise.
+func (f *FirstPatchedVersion) GetIdentifier() string {
+	if f == nil || f.Identifier == nil {
+		return ""
+	}
+	return *f.Identifier
+}
+
 // GetForkee returns the Forkee field.
 func (f *ForkEvent) GetForkee() *Repository {
 	if f == nil {
@@ -16236,6 +16380,78 @@ func (s *SecretScanningAlertUpdateOptions) GetState() string {
 	return *s.State
 }
 
+// GetDescription returns the Description field if it's non-nil, zero value otherwise.
+func (s *SecurityAdvisory) GetDescription() string {
+	if s == nil || s.Description == nil {
+		return ""
+	}
+	return *s.Description
+}
+
+// GetGHSAID returns the GHSAID field if it's non-nil, zero value otherwise.
+func (s *SecurityAdvisory) GetGHSAID() string {
+	if s == nil || s.GHSAID == nil {
+		return ""
+	}
+	return *s.GHSAID
+}
+
+// GetPublishedAt returns the PublishedAt field if it's non-nil, zero value otherwise.
+func (s *SecurityAdvisory) GetPublishedAt() Timestamp {
+	if s == nil || s.PublishedAt == nil {
+		return Timestamp{}
+	}
+	return *s.PublishedAt
+}
+
+// GetSeverity returns the Severity field if it's non-nil, zero value otherwise.
+func (s *SecurityAdvisory) GetSeverity() string {
+	if s == nil || s.Severity == nil {
+		return ""
+	}
+	return *s.Severity
+}
+
+// GetSummary returns the Summary field if it's non-nil, zero value otherwise.
+func (s *SecurityAdvisory) GetSummary() string {
+	if s == nil || s.Summary == nil {
+		return ""
+	}
+	return *s.Summary
+}
+
+// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
+func (s *SecurityAdvisory) GetUpdatedAt() Timestamp {
+	if s == nil || s.UpdatedAt == nil {
+		return Timestamp{}
+	}
+	return *s.UpdatedAt
+}
+
+// GetWithdrawnAt returns the WithdrawnAt field if it's non-nil, zero value otherwise.
+func (s *SecurityAdvisory) GetWithdrawnAt() Timestamp {
+	if s == nil || s.WithdrawnAt == nil {
+		return Timestamp{}
+	}
+	return *s.WithdrawnAt
+}
+
+// GetAction returns the Action field if it's non-nil, zero value otherwise.
+func (s *SecurityAdvisoryEvent) GetAction() string {
+	if s == nil || s.Action == nil {
+		return ""
+	}
+	return *s.Action
+}
+
+// GetSecurityAdvisory returns the SecurityAdvisory field.
+func (s *SecurityAdvisoryEvent) GetSecurityAdvisory() *SecurityAdvisory {
+	if s == nil {
+		return nil
+	}
+	return s.SecurityAdvisory
+}
+
 // GetAdvancedSecurity returns the AdvancedSecurity field.
 func (s *SecurityAndAnalysis) GetAdvancedSecurity() *AdvancedSecurity {
 	if s == nil {
@@ -18732,6 +18948,22 @@ func (u *UserSuspendOptions) GetReason() string {
 	return *u.Reason
 }
 
+// GetEcosystem returns the Ecosystem field if it's non-nil, zero value otherwise.
+func (v *VulnerabilityPackage) GetEcosystem() string {
+	if v == nil || v.Ecosystem == nil {
+		return ""
+	}
+	return *v.Ecosystem
+}
+
+// GetName returns the Name field if it's non-nil, zero value otherwise.
+func (v *VulnerabilityPackage) GetName() string {
+	if v == nil || v.Name == nil {
+		return ""
+	}
+	return *v.Name
+}
+
 // GetAction returns the Action field if it's non-nil, zero value otherwise.
 func (w *WatchEvent) GetAction() string {
 	if w == nil || w.Action == nil {
diff --git a/github/repos_hooks_deliveries.go b/github/repos_hooks_deliveries.go
index 17132695..7420b59e 100644
--- a/github/repos_hooks_deliveries.go
+++ b/github/repos_hooks_deliveries.go
@@ -104,6 +104,25 @@ func (s *RepositoriesService) GetHookDelivery(ctx context.Context, owner, repo s
 	return h, resp, nil
 }
 
+// RedeliverHookDelivery redelivers a delivery for a webhook configured in a repository.
+//
+// GitHub API docs: https://docs.github.com/en/rest/reference/webhooks#redeliver-a-delivery-for-a-repository-webhook
+func (s *RepositoriesService) RedeliverHookDelivery(ctx context.Context, owner, repo string, hookID, deliveryID int64) (*HookDelivery, *Response, error) {
+	u := fmt.Sprintf("repos/%v/%v/hooks/%v/deliveries/%v/attempts", owner, repo, hookID, deliveryID)
+	req, err := s.client.NewRequest("POST", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	h := new(HookDelivery)
+	resp, err := s.client.Do(ctx, req, h)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return h, resp, nil
+}
+
 // ParseRequestPayload parses the request payload. For recognized event types,
 // a value of the corresponding struct type will be returned.
 func (d *HookDelivery) ParseRequestPayload() (interface{}, error) {
diff --git a/go.mod b/go.mod
index 5b507431..03c8747d 100644
--- a/go.mod
+++ b/go.mod
@@ -1,21 +1,16 @@
 module github.com/google/go-github/v43
 
 require (
-	github.com/bradleyfalzon/ghinstallation/v2 v2.0.4
 	github.com/google/go-cmp v0.5.7
 	github.com/google/go-querystring v1.1.0
 	golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
 	golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
-	google.golang.org/appengine v1.6.7
 )
 
 require (
-	github.com/golang-jwt/jwt/v4 v4.0.0 // indirect
 	github.com/golang/protobuf v1.3.2 // indirect
-	github.com/google/go-github/v41 v41.0.0 // indirect
 	golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
-	golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
-	golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
+	google.golang.org/appengine v1.6.7 // indirect
 )
 
 go 1.17
diff --git a/go.sum b/go.sum
index 5b69389a..caf35c5a 100644
--- a/go.sum
+++ b/go.sum
@@ -1,16 +1,9 @@
-github.com/bradleyfalzon/ghinstallation/v2 v2.0.4 h1:tXKVfhE7FcSkhkv0UwkLvPDeZ4kz6OXd0PKPlFqf81M=
-github.com/bradleyfalzon/ghinstallation/v2 v2.0.4/go.mod h1:B40qPqJxWE0jDZgOR1JmaMy+4AY1eBP+IByOvqyAKp0=
-github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o=
-github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
 github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
 github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
 github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
-github.com/google/go-github/v41 v41.0.0 h1:HseJrM2JFf2vfiZJ8anY2hqBjdfY1Vlj/K27ueww4gg=
-github.com/google/go-github/v41 v41.0.0/go.mod h1:XgmCA5H323A9rtgExdTcnDkcqp6S30AVACCBDOonIxg=
 github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
 github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -23,9 +16,7 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 991c5cb3..39dd2edf 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -37,7 +37,7 @@ jobs:
     - uses: actions/setup-go@v2
       with:
         go-version: ${{ matrix.go-version }}
-    - uses: actions/checkout@v2
+    - uses: actions/checkout@v3
 
     # Get values for cache paths to be used in later steps 
     - id: cache-paths
diff --git a/github/event_types_test.go b/github/event_types_test.go
index c4a79b77..5f9dd258 100644
--- a/github/event_types_test.go
+++ b/github/event_types_test.go
@@ -13814,3 +13814,421 @@ func TestSecretScanningAlertEvent_Marshal(t *testing.T) {
 
 	testJSONMarshal(t, u, want)
 }
+
+func TestSecurityAdvisoryEvent_Marshal(t *testing.T) {
+	testJSONMarshal(t, &SecurityAdvisoryEvent{}, "{}")
+	u := &SecurityAdvisoryEvent{
+		Action: String("published"),
+		SecurityAdvisory: &SecurityAdvisory{
+			GHSAID:      String("GHSA-rf4j-j272-some"),
+			Summary:     String("Siuuuuuuuuu"),
+			Description: String("desc"),
+			Severity:    String("moderate"),
+			Identifiers: []*AdvisoryIdentifier{
+				{
+					Value: String("GHSA-rf4j-j272-some"),
+					Type:  String("GHSA"),
+				},
+			},
+			References: []*AdvisoryReference{
+				{
+					URL: String("https://some-url"),
+				},
+			},
+			PublishedAt: &Timestamp{referenceTime},
+			UpdatedAt:   &Timestamp{referenceTime},
+			WithdrawnAt: nil,
+			Vulnerabilities: []*AdvisoryVulnerability{
+				{
+					Package: &VulnerabilityPackage{
+						Ecosystem: String("ucl"),
+						Name:      String("penaldo"),
+					},
+					Severity:               String("moderate"),
+					VulnerableVersionRange: String(">= 2.0.0, < 2.0.2"),
+					FirstPatchedVersion: &FirstPatchedVersion{
+						Identifier: String("2.0.2"),
+					},
+				},
+			},
+		},
+	}
+
+	want := `{
+		"action": "published",
+		"security_advisory": {
+		  "ghsa_id": "GHSA-rf4j-j272-some",
+		  "summary": "Siuuuuuuuuu",
+		  "description": "desc",
+		  "severity": "moderate",
+		  "identifiers": [
+			{
+			  "value": "GHSA-rf4j-j272-some",
+			  "type": "GHSA"
+			}
+		  ],
+		  "references": [
+			{
+			  "url": "https://some-url"
+			}
+		  ],
+		  "published_at": ` + referenceTimeStr + `,
+		  "updated_at": ` + referenceTimeStr + `,
+		  "withdrawn_at": null,
+		  "vulnerabilities": [
+			{
+			  "package": {
+				"ecosystem": "ucl",
+				"name": "penaldo"
+			  },
+			  "severity": "moderate",
+			  "vulnerable_version_range": ">= 2.0.0, < 2.0.2",
+			  "first_patched_version": {
+				"identifier": "2.0.2"
+			  }
+			}
+		  ]
+		}
+	  }`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestCodeScanningAlertEvent_Marshal(t *testing.T) {
+	testJSONMarshal(t, &CodeScanningAlertEvent{}, "{}")
+
+	u := &CodeScanningAlertEvent{
+		Action: String("reopened"),
+		Alert: &Alert{
+			Number: Int(10),
+			Rule: &Rule{
+				ID:              String("Style/FrozenStringLiteralComment"),
+				Severity:        String("note"),
+				Description:     String("desc"),
+				FullDescription: String("full desc"),
+				Tags:            []string{"style"},
+				Help:            String("help"),
+			},
+			Tool: &Tool{
+				Name:    String("Rubocop"),
+				Version: nil,
+			},
+			CreatedAt: &Timestamp{referenceTime},
+			UpdatedAt: &Timestamp{referenceTime},
+			FixedAt:   nil,
+			State:     String("open"),
+			URL:       String("a"),
+			HTMLURL:   String("a"),
+			Instances: []*MostRecentInstance{
+				{
+					Ref:         String("refs/heads/main"),
+					AnalysisKey: String(".github/workflows/workflow.yml:upload"),
+					Environment: String("{}"),
+					State:       String("open"),
+				},
+			},
+			DismissedBy:     nil,
+			DismissedAt:     nil,
+			DismissedReason: nil,
+		},
+		Ref:       String("refs/heads/main"),
+		CommitOID: String("d6e4c75c141dbacecc279b721b8bsomeSHA"),
+		Repo: &Repository{
+			ID:     Int64(1234234535),
+			NodeID: String("MDEwOlJlcG9zaXRvcnkxODY4NT=="),
+			Owner: &User{
+				Login:             String("Codertocat"),
+				ID:                Int64(21031067),
+				NodeID:            String("MDQ6VXNlcjIxMDMxMDY3"),
+				AvatarURL:         String("a"),
+				GravatarID:        String(""),
+				URL:               String("a"),
+				HTMLURL:           String("a"),
+				Type:              String("User"),
+				SiteAdmin:         Bool(false),
+				FollowersURL:      String("a"),
+				FollowingURL:      String("a"),
+				EventsURL:         String("a"),
+				GistsURL:          String("a"),
+				OrganizationsURL:  String("a"),
+				ReceivedEventsURL: String("a"),
+				ReposURL:          String("a"),
+				StarredURL:        String("a"),
+				SubscriptionsURL:  String("a"),
+			},
+			HTMLURL:          String("a"),
+			Name:             String("Hello-World"),
+			FullName:         String("Codertocat/Hello-World"),
+			Description:      nil,
+			Fork:             Bool(false),
+			Homepage:         nil,
+			DefaultBranch:    String("main"),
+			CreatedAt:        &Timestamp{referenceTime},
+			PushedAt:         &Timestamp{referenceTime},
+			UpdatedAt:        &Timestamp{referenceTime},
+			CloneURL:         String("a"),
+			GitURL:           String("a"),
+			MirrorURL:        nil,
+			SSHURL:           String("a"),
+			SVNURL:           String("a"),
+			Language:         nil,
+			ForksCount:       Int(0),
+			OpenIssuesCount:  Int(2),
+			OpenIssues:       Int(2),
+			StargazersCount:  Int(0),
+			WatchersCount:    Int(0),
+			Watchers:         Int(0),
+			Size:             Int(0),
+			Archived:         Bool(false),
+			Disabled:         Bool(false),
+			License:          nil,
+			Private:          Bool(false),
+			HasIssues:        Bool(true),
+			HasWiki:          Bool(true),
+			HasPages:         Bool(true),
+			HasProjects:      Bool(true),
+			HasDownloads:     Bool(true),
+			URL:              String("a"),
+			ArchiveURL:       String("a"),
+			AssigneesURL:     String("a"),
+			BlobsURL:         String("a"),
+			BranchesURL:      String("a"),
+			CollaboratorsURL: String("a"),
+			CommentsURL:      String("a"),
+			CommitsURL:       String("a"),
+			CompareURL:       String("a"),
+			ContentsURL:      String("a"),
+			ContributorsURL:  String("a"),
+			DeploymentsURL:   String("a"),
+			DownloadsURL:     String("a"),
+			EventsURL:        String("a"),
+			ForksURL:         String("a"),
+			GitCommitsURL:    String("a"),
+			GitRefsURL:       String("a"),
+			GitTagsURL:       String("a"),
+			HooksURL:         String("a"),
+			IssueCommentURL:  String("a"),
+			IssueEventsURL:   String("a"),
+			IssuesURL:        String("a"),
+			KeysURL:          String("a"),
+			LabelsURL:        String("a"),
+			LanguagesURL:     String("a"),
+			MergesURL:        String("a"),
+			MilestonesURL:    String("a"),
+			NotificationsURL: String("a"),
+			PullsURL:         String("a"),
+			ReleasesURL:      String("a"),
+			StargazersURL:    String("a"),
+			StatusesURL:      String("a"),
+			SubscribersURL:   String("a"),
+			SubscriptionURL:  String("a"),
+			TagsURL:          String("a"),
+			TreesURL:         String("a"),
+			TeamsURL:         String("a"),
+		},
+		Org: &Organization{
+			Login:            String("Octocoders"),
+			ID:               Int64(6),
+			NodeID:           String("MDEyOk9yZ2FuaXphdGlvbjY="),
+			AvatarURL:        String("a"),
+			Description:      String(""),
+			URL:              String("a"),
+			EventsURL:        String("a"),
+			HooksURL:         String("a"),
+			IssuesURL:        String("a"),
+			MembersURL:       String("a"),
+			PublicMembersURL: String("a"),
+			ReposURL:         String("a"),
+		},
+		Sender: &User{
+			Login:             String("github"),
+			ID:                Int64(9919),
+			NodeID:            String("MDEyOk9yZ2FuaXphdGlvbjk5MTk="),
+			AvatarURL:         String("a"),
+			HTMLURL:           String("a"),
+			GravatarID:        String(""),
+			Type:              String("Organization"),
+			SiteAdmin:         Bool(false),
+			URL:               String("a"),
+			EventsURL:         String("a"),
+			FollowingURL:      String("a"),
+			FollowersURL:      String("a"),
+			GistsURL:          String("a"),
+			OrganizationsURL:  String("a"),
+			ReceivedEventsURL: String("a"),
+			ReposURL:          String("a"),
+			StarredURL:        String("a"),
+			SubscriptionsURL:  String("a"),
+		},
+	}
+
+	want := `{
+		"action": "reopened",
+		"alert": {
+		  "number": 10,
+		  "created_at": ` + referenceTimeStr + `,
+		  "updated_at": ` + referenceTimeStr + `,
+		  "url": "a",
+		  "html_url": "a",
+		  "instances": [
+			{
+			  "ref": "refs/heads/main",
+			  "analysis_key": ".github/workflows/workflow.yml:upload",
+			  "environment": "{}",
+			  "state": "open"
+			}
+		  ],
+		  "state": "open",
+		  "fixed_at": null,
+		  "dismissed_by": null,
+		  "dismissed_at": null,
+		  "dismissed_reason": null,
+		  "rule": {
+			"id": "Style/FrozenStringLiteralComment",
+			"severity": "note",
+			"description": "desc",
+			"full_description": "full desc",
+			"tags": [
+			  "style"
+			],
+			"help": "help"
+		  },
+		  "tool": {
+			"name": "Rubocop",
+			"version": null
+		  }
+		},
+		"ref": "refs/heads/main",
+		"commit_oid": "d6e4c75c141dbacecc279b721b8bsomeSHA",
+		"repository": {
+		  "id": 1234234535,
+		  "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NT==",
+		  "name": "Hello-World",
+		  "full_name": "Codertocat/Hello-World",
+		  "private": false,
+		  "owner": {
+			"login": "Codertocat",
+			"id": 21031067,
+			"node_id": "MDQ6VXNlcjIxMDMxMDY3",
+			"avatar_url": "a",
+			"gravatar_id": "",
+			"url": "a",
+			"html_url": "a",
+			"followers_url": "a",
+			"following_url": "a",
+			"gists_url": "a",
+			"starred_url": "a",
+			"subscriptions_url": "a",
+			"organizations_url": "a",
+			"repos_url": "a",
+			"events_url": "a",
+			"received_events_url": "a",
+			"type": "User",
+			"site_admin": false
+		  },
+		  "html_url": "a",
+		  "description": null,
+		  "fork": false,
+		  "url": "a",
+		  "forks_url": "a",
+		  "keys_url": "a",
+		  "collaborators_url": "a",
+		  "teams_url": "a",
+		  "hooks_url": "a",
+		  "issue_events_url": "a",
+		  "events_url": "a",
+		  "assignees_url": "a",
+		  "branches_url": "a",
+		  "tags_url": "a",
+		  "blobs_url": "a",
+		  "git_tags_url": "a",
+		  "git_refs_url": "a",
+		  "trees_url": "a",
+		  "statuses_url": "a",
+		  "languages_url": "a",
+		  "stargazers_url": "a",
+		  "contributors_url": "a",
+		  "subscribers_url": "a",
+		  "subscription_url": "a",
+		  "commits_url": "a",
+		  "git_commits_url": "a",
+		  "comments_url": "a",
+		  "issue_comment_url": "a",
+		  "contents_url": "a",
+		  "compare_url": "a",
+		  "merges_url": "a",
+		  "archive_url": "a",
+		  "downloads_url": "a",
+		  "issues_url": "a",
+		  "pulls_url": "a",
+		  "milestones_url": "a",
+		  "notifications_url": "a",
+		  "labels_url": "a",
+		  "releases_url": "a",
+		  "deployments_url": "a",
+		  "created_at": ` + referenceTimeStr + `,
+		  "updated_at": ` + referenceTimeStr + `,
+		  "pushed_at": ` + referenceTimeStr + `,
+		  "git_url": "a",
+		  "ssh_url": "a",
+		  "clone_url": "a",
+		  "svn_url": "a",
+		  "homepage": null,
+		  "size": 0,
+		  "stargazers_count": 0,
+		  "watchers_count": 0,
+		  "language": null,
+		  "has_issues": true,
+		  "has_projects": true,
+		  "has_downloads": true,
+		  "has_wiki": true,
+		  "has_pages": true,
+		  "forks_count": 0,
+		  "mirror_url": null,
+		  "archived": false,
+		  "disabled": false,
+		  "open_issues_count": 2,
+		  "license": null,
+		  "forks": 0,
+		  "open_issues": 2,
+		  "watchers": 0,
+		  "default_branch": "main"
+		},
+		"organization": {
+		  "login": "Octocoders",
+		  "id": 6,
+		  "node_id": "MDEyOk9yZ2FuaXphdGlvbjY=",
+		  "url": "a",
+		  "repos_url": "a",
+		  "events_url": "a",
+		  "hooks_url": "a",
+		  "issues_url": "a",
+		  "members_url": "a",
+		  "public_members_url": "a",
+		  "avatar_url": "a",
+		  "description": ""
+		},
+		"sender": {
+		  "login": "github",
+		  "id": 9919,
+		  "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",
+		  "avatar_url": "a",
+		  "gravatar_id": "",
+		  "url": "a",
+		  "html_url": "a",
+		  "followers_url": "a",
+		  "following_url": "a",
+		  "gists_url": "a",
+		  "starred_url": "a",
+		  "subscriptions_url": "a",
+		  "organizations_url": "a",
+		  "repos_url": "a",
+		  "events_url": "a",
+		  "received_events_url": "a",
+		  "type": "Organization",
+		  "site_admin": false
+		}
+	  }`
+
+	testJSONMarshal(t, u, want)
+}
diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go
index d06e6356..1b0556fd 100644
--- a/github/github-accessors_test.go
+++ b/github/github-accessors_test.go
@@ -183,6 +183,70 @@ func TestAdvancedSecurityCommittersBreakdown_GetUserLogin(tt *testing.T) {
 	a.GetUserLogin()
 }
 
+func TestAdvisoryIdentifier_GetType(tt *testing.T) {
+	var zeroValue string
+	a := &AdvisoryIdentifier{Type: &zeroValue}
+	a.GetType()
+	a = &AdvisoryIdentifier{}
+	a.GetType()
+	a = nil
+	a.GetType()
+}
+
+func TestAdvisoryIdentifier_GetValue(tt *testing.T) {
+	var zeroValue string
+	a := &AdvisoryIdentifier{Value: &zeroValue}
+	a.GetValue()
+	a = &AdvisoryIdentifier{}
+	a.GetValue()
+	a = nil
+	a.GetValue()
+}
+
+func TestAdvisoryReference_GetURL(tt *testing.T) {
+	var zeroValue string
+	a := &AdvisoryReference{URL: &zeroValue}
+	a.GetURL()
+	a = &AdvisoryReference{}
+	a.GetURL()
+	a = nil
+	a.GetURL()
+}
+
+func TestAdvisoryVulnerability_GetFirstPatchedVersion(tt *testing.T) {
+	a := &AdvisoryVulnerability{}
+	a.GetFirstPatchedVersion()
+	a = nil
+	a.GetFirstPatchedVersion()
+}
+
+func TestAdvisoryVulnerability_GetPackage(tt *testing.T) {
+	a := &AdvisoryVulnerability{}
+	a.GetPackage()
+	a = nil
+	a.GetPackage()
+}
+
+func TestAdvisoryVulnerability_GetSeverity(tt *testing.T) {
+	var zeroValue string
+	a := &AdvisoryVulnerability{Severity: &zeroValue}
+	a.GetSeverity()
+	a = &AdvisoryVulnerability{}
+	a.GetSeverity()
+	a = nil
+	a.GetSeverity()
+}
+
+func TestAdvisoryVulnerability_GetVulnerableVersionRange(tt *testing.T) {
+	var zeroValue string
+	a := &AdvisoryVulnerability{VulnerableVersionRange: &zeroValue}
+	a.GetVulnerableVersionRange()
+	a = &AdvisoryVulnerability{}
+	a.GetVulnerableVersionRange()
+	a = nil
+	a.GetVulnerableVersionRange()
+}
+
 func TestAlert_GetClosedAt(tt *testing.T) {
 	var zeroValue Timestamp
 	a := &Alert{ClosedAt: &zeroValue}
@@ -237,6 +301,16 @@ func TestAlert_GetDismissedReason(tt *testing.T) {
 	a.GetDismissedReason()
 }
 
+func TestAlert_GetFixedAt(tt *testing.T) {
+	var zeroValue Timestamp
+	a := &Alert{FixedAt: &zeroValue}
+	a.GetFixedAt()
+	a = &Alert{}
+	a.GetFixedAt()
+	a = nil
+	a.GetFixedAt()
+}
+
 func TestAlert_GetHTMLURL(tt *testing.T) {
 	var zeroValue string
 	a := &Alert{HTMLURL: &zeroValue}
@@ -264,6 +338,16 @@ func TestAlert_GetMostRecentInstance(tt *testing.T) {
 	a.GetMostRecentInstance()
 }
 
+func TestAlert_GetNumber(tt *testing.T) {
+	var zeroValue int
+	a := &Alert{Number: &zeroValue}
+	a.GetNumber()
+	a = &Alert{}
+	a.GetNumber()
+	a = nil
+	a.GetNumber()
+}
+
 func TestAlert_GetRule(tt *testing.T) {
 	a := &Alert{}
 	a.GetRule()
@@ -318,6 +402,16 @@ func TestAlert_GetTool(tt *testing.T) {
 	a.GetTool()
 }
 
+func TestAlert_GetUpdatedAt(tt *testing.T) {
+	var zeroValue Timestamp
+	a := &Alert{UpdatedAt: &zeroValue}
+	a.GetUpdatedAt()
+	a = &Alert{}
+	a.GetUpdatedAt()
+	a = nil
+	a.GetUpdatedAt()
+}
+
 func TestAlert_GetURL(tt *testing.T) {
 	var zeroValue string
 	a := &Alert{URL: &zeroValue}
@@ -2613,6 +2707,64 @@ func TestCodeResult_GetSHA(tt *testing.T) {
 	c.GetSHA()
 }
 
+func TestCodeScanningAlertEvent_GetAction(tt *testing.T) {
+	var zeroValue string
+	c := &CodeScanningAlertEvent{Action: &zeroValue}
+	c.GetAction()
+	c = &CodeScanningAlertEvent{}
+	c.GetAction()
+	c = nil
+	c.GetAction()
+}
+
+func TestCodeScanningAlertEvent_GetAlert(tt *testing.T) {
+	c := &CodeScanningAlertEvent{}
+	c.GetAlert()
+	c = nil
+	c.GetAlert()
+}
+
+func TestCodeScanningAlertEvent_GetCommitOID(tt *testing.T) {
+	var zeroValue string
+	c := &CodeScanningAlertEvent{CommitOID: &zeroValue}
+	c.GetCommitOID()
+	c = &CodeScanningAlertEvent{}
+	c.GetCommitOID()
+	c = nil
+	c.GetCommitOID()
+}
+
+func TestCodeScanningAlertEvent_GetOrg(tt *testing.T) {
+	c := &CodeScanningAlertEvent{}
+	c.GetOrg()
+	c = nil
+	c.GetOrg()
+}
+
+func TestCodeScanningAlertEvent_GetRef(tt *testing.T) {
+	var zeroValue string
+	c := &CodeScanningAlertEvent{Ref: &zeroValue}
+	c.GetRef()
+	c = &CodeScanningAlertEvent{}
+	c.GetRef()
+	c = nil
+	c.GetRef()
+}
+
+func TestCodeScanningAlertEvent_GetRepo(tt *testing.T) {
+	c := &CodeScanningAlertEvent{}
+	c.GetRepo()
+	c = nil
+	c.GetRepo()
+}
+
+func TestCodeScanningAlertEvent_GetSender(tt *testing.T) {
+	c := &CodeScanningAlertEvent{}
+	c.GetSender()
+	c = nil
+	c.GetSender()
+}
+
 func TestCodeSearchResult_GetIncompleteResults(tt *testing.T) {
 	var zeroValue bool
 	c := &CodeSearchResult{IncompleteResults: &zeroValue}
@@ -5761,6 +5913,16 @@ func TestFeeds_GetUserURL(tt *testing.T) {
 	f.GetUserURL()
 }
 
+func TestFirstPatchedVersion_GetIdentifier(tt *testing.T) {
+	var zeroValue string
+	f := &FirstPatchedVersion{Identifier: &zeroValue}
+	f.GetIdentifier()
+	f = &FirstPatchedVersion{}
+	f.GetIdentifier()
+	f = nil
+	f.GetIdentifier()
+}
+
 func TestForkEvent_GetForkee(tt *testing.T) {
 	f := &ForkEvent{}
 	f.GetForkee()
@@ -18997,6 +19159,93 @@ func TestSecretScanningAlertUpdateOptions_GetState(tt *testing.T) {
 	s.GetState()
 }
 
+func TestSecurityAdvisory_GetDescription(tt *testing.T) {
+	var zeroValue string
+	s := &SecurityAdvisory{Description: &zeroValue}
+	s.GetDescription()
+	s = &SecurityAdvisory{}
+	s.GetDescription()
+	s = nil
+	s.GetDescription()
+}
+
+func TestSecurityAdvisory_GetGHSAID(tt *testing.T) {
+	var zeroValue string
+	s := &SecurityAdvisory{GHSAID: &zeroValue}
+	s.GetGHSAID()
+	s = &SecurityAdvisory{}
+	s.GetGHSAID()
+	s = nil
+	s.GetGHSAID()
+}
+
+func TestSecurityAdvisory_GetPublishedAt(tt *testing.T) {
+	var zeroValue Timestamp
+	s := &SecurityAdvisory{PublishedAt: &zeroValue}
+	s.GetPublishedAt()
+	s = &SecurityAdvisory{}
+	s.GetPublishedAt()
+	s = nil
+	s.GetPublishedAt()
+}
+
+func TestSecurityAdvisory_GetSeverity(tt *testing.T) {
+	var zeroValue string
+	s := &SecurityAdvisory{Severity: &zeroValue}
+	s.GetSeverity()
+	s = &SecurityAdvisory{}
+	s.GetSeverity()
+	s = nil
+	s.GetSeverity()
+}
+
+func TestSecurityAdvisory_GetSummary(tt *testing.T) {
+	var zeroValue string
+	s := &SecurityAdvisory{Summary: &zeroValue}
+	s.GetSummary()
+	s = &SecurityAdvisory{}
+	s.GetSummary()
+	s = nil
+	s.GetSummary()
+}
+
+func TestSecurityAdvisory_GetUpdatedAt(tt *testing.T) {
+	var zeroValue Timestamp
+	s := &SecurityAdvisory{UpdatedAt: &zeroValue}
+	s.GetUpdatedAt()
+	s = &SecurityAdvisory{}
+	s.GetUpdatedAt()
+	s = nil
+	s.GetUpdatedAt()
+}
+
+func TestSecurityAdvisory_GetWithdrawnAt(tt *testing.T) {
+	var zeroValue Timestamp
+	s := &SecurityAdvisory{WithdrawnAt: &zeroValue}
+	s.GetWithdrawnAt()
+	s = &SecurityAdvisory{}
+	s.GetWithdrawnAt()
+	s = nil
+	s.GetWithdrawnAt()
+}
+
+func TestSecurityAdvisoryEvent_GetAction(tt *testing.T) {
+	var zeroValue string
+	s := &SecurityAdvisoryEvent{Action: &zeroValue}
+	s.GetAction()
+	s = &SecurityAdvisoryEvent{}
+	s.GetAction()
+	s = nil
+	s.GetAction()
+}
+
+func TestSecurityAdvisoryEvent_GetSecurityAdvisory(tt *testing.T) {
+	s := &SecurityAdvisoryEvent{}
+	s.GetSecurityAdvisory()
+	s = nil
+	s.GetSecurityAdvisory()
+}
+
 func TestSecurityAndAnalysis_GetAdvancedSecurity(tt *testing.T) {
 	s := &SecurityAndAnalysis{}
 	s.GetAdvancedSecurity()
@@ -21940,6 +22189,26 @@ func TestUserSuspendOptions_GetReason(tt *testing.T) {
 	u.GetReason()
 }
 
+func TestVulnerabilityPackage_GetEcosystem(tt *testing.T) {
+	var zeroValue string
+	v := &VulnerabilityPackage{Ecosystem: &zeroValue}
+	v.GetEcosystem()
+	v = &VulnerabilityPackage{}
+	v.GetEcosystem()
+	v = nil
+	v.GetEcosystem()
+}
+
+func TestVulnerabilityPackage_GetName(tt *testing.T) {
+	var zeroValue string
+	v := &VulnerabilityPackage{Name: &zeroValue}
+	v.GetName()
+	v = &VulnerabilityPackage{}
+	v.GetName()
+	v = nil
+	v.GetName()
+}
+
 func TestWatchEvent_GetAction(tt *testing.T) {
 	var zeroValue string
 	w := &WatchEvent{Action: &zeroValue}
diff --git a/github/repos_hooks_deliveries_test.go b/github/repos_hooks_deliveries_test.go
index bdcaabec..1a276859 100644
--- a/github/repos_hooks_deliveries_test.go
+++ b/github/repos_hooks_deliveries_test.go
@@ -107,6 +107,41 @@ func TestRepositoriesService_GetHookDelivery_invalidOwner(t *testing.T) {
 	testURLParseError(t, err)
 }
 
+func TestRepositoriesService_RedeliverHookDelivery(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/repos/o/r/hooks/1/deliveries/1/attempts", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "POST")
+		fmt.Fprint(w, `{"id":1}`)
+	})
+
+	ctx := context.Background()
+	hook, _, err := client.Repositories.RedeliverHookDelivery(ctx, "o", "r", 1, 1)
+	if err != nil {
+		t.Errorf("Repositories.RedeliverHookDelivery returned error: %v", err)
+	}
+
+	want := &HookDelivery{ID: Int64(1)}
+	if !cmp.Equal(hook, want) {
+		t.Errorf("Repositories.RedeliverHookDelivery returned %+v, want %+v", hook, want)
+	}
+
+	const methodName = "RedeliverHookDelivery"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.Repositories.RedeliverHookDelivery(ctx, "\n", "\n", -1, -1)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.Repositories.RedeliverHookDelivery(ctx, "o", "r", 1, 1)
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
 var hookDeliveryPayloadTypeToStruct = map[string]interface{}{
 	"check_run":                      &CheckRunEvent{},
 	"check_suite":                    &CheckSuiteEvent{},