Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
chore: merge
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Jan 16, 2024
1 parent 626cae8 commit 3014776
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 415 deletions.
12 changes: 1 addition & 11 deletions src/handlers/pricing/pricing-label.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Context } from "../../types/context";

import { addLabelToIssue, clearAllPriceLabelsOnIssue } from "../../helpers/issue";
import { createLabel } from "../../helpers/label";
import { BotConfig } from "../../types/configuration-types";
import { Label } from "../../types/label";
import { GitHubPayload, UserType } from "../../types/payload";
import { labelAccessPermissionsCheck } from "../access/labels-access";
import { setPrice } from "../shared/pricing";
import { handleParentIssue, isParentIssue, sortLabelsByValue } from "./handle-parent-issue";
import { clearAllPriceLabelsOnIssue, addLabelToIssue } from "../../helpers/issue";

export async function onLabelChangeSetPricing(context: Context): Promise<void> {
const config = context.config;
Expand Down Expand Up @@ -142,16 +142,7 @@ async function addPriceLabelToIssue(context: Context, targetPriceLabel: string)
}

export async function labelExists(context: Context, name: string): Promise<boolean> {
<<<<<<< HEAD
const payload = context.event.payload as GitHubPayload;
const res = await context.event.octokit.rest.issues.getLabel({
owner: payload.repository.owner.login,
repo: payload.repository.name,
name,
});
return res.status === 200;
=======
const payload = context.event.payload as Payload;
try {
await context.event.octokit.rest.issues.getLabel({
owner: payload.repository.owner.login,
Expand All @@ -162,7 +153,6 @@ export async function labelExists(context: Context, name: string): Promise<boole
} catch (error) {
return false;
}
>>>>>>> a7034915869f1c0547427bbe081402908d7977d9
}

async function getAllLabeledEvents(context: Context) {
Expand Down
Loading

0 comments on commit 3014776

Please sign in to comment.