@@ -17,9 +17,7 @@ import (
1717)
1818
1919func TestRepositories_CRUD (t * testing.T ) {
20- if ! checkAuth ("TestRepositories_CRUD" ) {
21- return
22- }
20+ skipIfMissingAuth (t )
2321
2422 repo := createRandomTestRepository (t , "" , true )
2523
@@ -75,9 +73,7 @@ func TestRepositories_BranchesTags(t *testing.T) {
7573}
7674
7775func TestRepositories_EditBranches (t * testing.T ) {
78- if ! checkAuth ("TestRepositories_EditBranches" ) {
79- return
80- }
76+ skipIfMissingAuth (t )
8177
8278 repo := createRandomTestRepository (t , "" , true )
8379
@@ -148,9 +144,7 @@ func TestRepositories_EditBranches(t *testing.T) {
148144}
149145
150146func TestRepositories_ListByAuthenticatedUser (t * testing.T ) {
151- if ! checkAuth ("TestRepositories_ListByAuthenticatedUser" ) {
152- return
153- }
147+ skipIfMissingAuth (t )
154148
155149 _ , _ , err := client .Repositories .ListByAuthenticatedUser (t .Context (), nil )
156150 if err != nil {
@@ -177,9 +171,7 @@ func TestRepositories_ListByUser(t *testing.T) {
177171}
178172
179173func TestRepositories_DownloadReleaseAsset (t * testing.T ) {
180- if ! checkAuth ("TestRepositories_DownloadReleaseAsset" ) {
181- return
182- }
174+ skipIfMissingAuth (t )
183175
184176 rc , _ , err := client .Repositories .DownloadReleaseAsset (t .Context (), "andersjanmyr" , "goose" , 484892 , http .DefaultClient )
185177 if err != nil {
@@ -193,9 +185,7 @@ func TestRepositories_DownloadReleaseAsset(t *testing.T) {
193185}
194186
195187func TestRepositories_Autolinks (t * testing.T ) {
196- if ! checkAuth ("TestRepositories_Autolinks" ) {
197- return
198- }
188+ skipIfMissingAuth (t )
199189
200190 repo := createRandomTestRepository (t , "" , true )
201191
0 commit comments