-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23fc9aa
commit aa38ee3
Showing
6 changed files
with
86 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import axios from "axios"; | ||
|
||
import { qawolfGraphQLEndpoint } from "./constants"; | ||
import { type LogHelper } from "./handleOperation"; | ||
|
||
export async function deleteTeamBranch({ | ||
branchId, | ||
log, | ||
qawolfApiKey, | ||
teamId, | ||
}: { | ||
branchId: string; | ||
log: LogHelper; | ||
qawolfApiKey: string; | ||
teamId: string; | ||
}) { | ||
await axios.post( | ||
qawolfGraphQLEndpoint, | ||
{ | ||
query: ` | ||
mutation deleteTeamBranch($branchId: String!, $teamId: String!) { | ||
deleteTeamBranch(data: { branchId: $branchId, teamId: $teamId }) | ||
} | ||
`, | ||
variables: { | ||
branchId, | ||
teamId, | ||
}, | ||
}, | ||
{ | ||
headers: { | ||
Authorization: `Bearer ${qawolfApiKey}`, | ||
"Content-Type": "application/json", | ||
}, | ||
}, | ||
); | ||
|
||
log.info(`Branch deleted with ID: ${branchId}`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { deleteTeamBranch } from "./deleteTeamBranch"; | ||
import { type LogHelper } from "./handleOperation"; | ||
|
||
export const deleteTeamBranchAction = async ({ | ||
qawolfApiKey, | ||
branchId, | ||
log, | ||
teamId, | ||
}: { | ||
branchId: string; | ||
log: LogHelper; | ||
qawolfApiKey: string; | ||
teamId: string; | ||
}) => { | ||
log.info(`Deleting branch with ID: ${branchId}`); | ||
await deleteTeamBranch({ branchId, log, qawolfApiKey, teamId }); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters