@@ -187,13 +187,13 @@ func (s *CodespacesService) getSecret(ctx context.Context, url string) (*Secret,
187187// GitHub API docs: https://docs.github.com/rest/codespaces/secrets?apiVersion=2022-11-28#create-or-update-a-secret-for-the-authenticated-user
188188//
189189//meta:operation PUT /user/codespaces/secrets/{secret_name}
190- func (s * CodespacesService ) CreateOrUpdateUserSecret (ctx context.Context , eSecret * EncryptedSecret ) (* Response , error ) {
191- if eSecret == nil {
190+ func (s * CodespacesService ) CreateOrUpdateUserSecret (ctx context.Context , body * EncryptedSecret ) (* Response , error ) {
191+ if body == nil {
192192 return nil , errors .New ("encrypted secret must be provided" )
193193 }
194194
195- u := fmt .Sprintf ("user/codespaces/secrets/%v" , eSecret .Name )
196- return s .createOrUpdateSecret (ctx , u , eSecret )
195+ u := fmt .Sprintf ("user/codespaces/secrets/%v" , body .Name )
196+ return s .createOrUpdateSecret (ctx , u , body )
197197}
198198
199199// CreateOrUpdateOrgSecret creates or updates an orgs codespace secret
@@ -203,13 +203,13 @@ func (s *CodespacesService) CreateOrUpdateUserSecret(ctx context.Context, eSecre
203203// GitHub API docs: https://docs.github.com/rest/codespaces/organization-secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret
204204//
205205//meta:operation PUT /orgs/{org}/codespaces/secrets/{secret_name}
206- func (s * CodespacesService ) CreateOrUpdateOrgSecret (ctx context.Context , org string , eSecret * EncryptedSecret ) (* Response , error ) {
207- if eSecret == nil {
206+ func (s * CodespacesService ) CreateOrUpdateOrgSecret (ctx context.Context , org string , body * EncryptedSecret ) (* Response , error ) {
207+ if body == nil {
208208 return nil , errors .New ("encrypted secret must be provided" )
209209 }
210210
211- u := fmt .Sprintf ("orgs/%v/codespaces/secrets/%v" , org , eSecret .Name )
212- return s .createOrUpdateSecret (ctx , u , eSecret )
211+ u := fmt .Sprintf ("orgs/%v/codespaces/secrets/%v" , org , body .Name )
212+ return s .createOrUpdateSecret (ctx , u , body )
213213}
214214
215215// CreateOrUpdateRepoSecret creates or updates a repos codespace secret
@@ -219,13 +219,13 @@ func (s *CodespacesService) CreateOrUpdateOrgSecret(ctx context.Context, org str
219219// GitHub API docs: https://docs.github.com/rest/codespaces/repository-secrets?apiVersion=2022-11-28#create-or-update-a-repository-secret
220220//
221221//meta:operation PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}
222- func (s * CodespacesService ) CreateOrUpdateRepoSecret (ctx context.Context , owner , repo string , eSecret * EncryptedSecret ) (* Response , error ) {
223- if eSecret == nil {
222+ func (s * CodespacesService ) CreateOrUpdateRepoSecret (ctx context.Context , owner , repo string , body * EncryptedSecret ) (* Response , error ) {
223+ if body == nil {
224224 return nil , errors .New ("encrypted secret must be provided" )
225225 }
226226
227- u := fmt .Sprintf ("repos/%v/%v/codespaces/secrets/%v" , owner , repo , eSecret .Name )
228- return s .createOrUpdateSecret (ctx , u , eSecret )
227+ u := fmt .Sprintf ("repos/%v/%v/codespaces/secrets/%v" , owner , repo , body .Name )
228+ return s .createOrUpdateSecret (ctx , u , body )
229229}
230230
231231func (s * CodespacesService ) createOrUpdateSecret (ctx context.Context , url string , body * EncryptedSecret ) (* Response , error ) {
0 commit comments