Add deleteRef method to API
Signed-off-by: Erik Engervall <erik.engervall@gmail.com>
This commit is contained in:
@@ -293,6 +293,19 @@ export class GitReleaseClient implements GitReleaseApi {
|
||||
};
|
||||
};
|
||||
|
||||
deleteRef: GitReleaseApi['deleteRef'] = async ({ owner, repo, ref }) => {
|
||||
const { octokit } = await this.getOctokit();
|
||||
const createRefResponse = await octokit.git.deleteRef({
|
||||
owner,
|
||||
repo,
|
||||
ref,
|
||||
});
|
||||
|
||||
return {
|
||||
success: createRefResponse.status === 204,
|
||||
};
|
||||
};
|
||||
|
||||
getComparison: GitReleaseApi['getComparison'] = async ({
|
||||
owner,
|
||||
repo,
|
||||
@@ -651,6 +664,14 @@ export interface GitReleaseApi {
|
||||
};
|
||||
}>;
|
||||
|
||||
deleteRef: (
|
||||
args: {
|
||||
ref: string;
|
||||
} & OwnerRepo,
|
||||
) => Promise<{
|
||||
success: boolean;
|
||||
}>;
|
||||
|
||||
getComparison: (
|
||||
args: {
|
||||
base: string;
|
||||
|
||||
Reference in New Issue
Block a user