(type: string, name: string, sha: string, opts: { force?: boolean } = {})
| 1223 | } |
| 1224 | |
| 1225 | async patchRef(type: string, name: string, sha: string, opts: { force?: boolean } = {}) { |
| 1226 | const force = opts.force || false; |
| 1227 | const result: Endpoints['PATCH /repos/{owner}/{repo}/git/refs/{ref}']['response']['data'] = |
| 1228 | await this.request(`${this.repoURL}/git/refs/${type}/${encodeURIComponent(name)}`, { |
| 1229 | method: 'PATCH', |
| 1230 | body: JSON.stringify({ sha, force }), |
| 1231 | }); |
| 1232 | return result; |
| 1233 | } |
| 1234 | |
| 1235 | deleteRef(type: string, name: string) { |
| 1236 | return this.request(`${this.repoURL}/git/refs/${type}/${encodeURIComponent(name)}`, { |
no test coverage detected