Skip to content

Commit 7e6570e

Browse files
Alialidevhere
authored andcommitted
asked changes done
1 parent 49f753e commit 7e6570e

File tree

4 files changed

+80
-8
lines changed

4 files changed

+80
-8
lines changed

github/actions_cache.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ type ActionsCacheUsageList struct {
5252
//
5353
// GitHub API docs: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#get-github-actions-cache-usage-for-an-enterprise
5454
type TotalCacheUsage struct {
55-
TotalActiveCacheUsageSizeInBytes int64 `json:"total_active_caches_size_in_bytes"`
56-
TotalActiveCachesCount int `json:"total_active_caches_count"`
55+
TotalActiveCachesUsageSizeInBytes int64 `json:"total_active_caches_size_in_bytes"`
56+
TotalActiveCachesCount int `json:"total_active_caches_count"`
5757
}
5858

5959
// ActionsCacheListOptions represents a list of all possible optional Query parameters for ListCaches method.
@@ -64,12 +64,12 @@ type ActionsCacheListOptions struct {
6464
// The Git reference for the results you want to list.
6565
// The ref for a branch can be formatted either as refs/heads/<branch name>
6666
// or simply <branch name>. To reference a pull request use refs/pull/<number>/merge
67-
Ref string `url:"ref,omitempty"`
68-
Key string `url:"key,omitempty"`
67+
Ref *string `url:"ref,omitempty"`
68+
Key *string `url:"key,omitempty"`
6969
// Can be one of: "created_at", "last_accessed_at", "size_in_bytes". Default: "last_accessed_at"
70-
Sort string `url:"sort,omitempty"`
70+
Sort *string `url:"sort,omitempty"`
7171
// Can be one of: "asc", "desc" Default: desc
72-
Direction string `url:"direction,omitempty"`
72+
Direction *string `url:"direction,omitempty"`
7373
}
7474

7575
// ListCaches lists the GitHub Actions caches for a repository.

github/actions_cache_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ func TestActionsService_GetCacheUsageForOrg(t *testing.T) {
394394
t.Errorf("Actions.GetTotalCacheUsageForOrg returned error: %v", err)
395395
}
396396

397-
want := &TotalCacheUsage{TotalActiveCacheUsageSizeInBytes: 1000, TotalActiveCachesCount: 1}
397+
want := &TotalCacheUsage{TotalActiveCachesUsageSizeInBytes: 1000, TotalActiveCachesCount: 1}
398398
if !cmp.Equal(cache, want) {
399399
t.Errorf("Actions.GetTotalCacheUsageForOrg returned %+v, want %+v", cache, want)
400400
}
@@ -465,7 +465,7 @@ func TestActionsService_GetCacheUsageForEnterprise(t *testing.T) {
465465
t.Errorf("Actions.GetTotalCacheUsageForEnterprise returned error: %v", err)
466466
}
467467

468-
want := &TotalCacheUsage{TotalActiveCacheUsageSizeInBytes: 1000, TotalActiveCachesCount: 1}
468+
want := &TotalCacheUsage{TotalActiveCachesUsageSizeInBytes: 1000, TotalActiveCachesCount: 1}
469469
if !cmp.Equal(cache, want) {
470470
t.Errorf("Actions.GetTotalCacheUsageForEnterprise returned %+v, want %+v", cache, want)
471471
}

github/github-accessors.go

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)