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

Commit

Permalink
feat: configurable promotion message
Browse files Browse the repository at this point in the history
  • Loading branch information
wannacfuture committed Jul 17, 2023
1 parent 5cdd36b commit d817e4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/configs/strings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const GLOBAL_STRINGS = {
unassignComment: "Releasing the bounty back to dev pool because the allocated duration already ended!",
askUpdate: "Do you have any updates",
promotionComment: `\n<h6>If you enjoy the DevPool experience, please follow <a href="https://github.com/ubiquity">Ubiquity on GitHub</a> and star <a href="https://github.com/ubiquity/devpool-directory">this repo</a> to show your support. It helps a lot!</h6>`,
};
4 changes: 2 additions & 2 deletions src/handlers/comment/handlers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { multiplier } from "./multiplier";
import { addCommentToIssue, createLabel, addLabelToIssue } from "../../../helpers";
import { getBotContext } from "../../../bindings";
import { handleIssueClosed } from "../../payout";
import { GLOBAL_STRINGS } from "../../../configs";

export * from "./assign";
export * from "./wallet";
Expand Down Expand Up @@ -45,8 +46,7 @@ export const issueClosedCallback = async (): Promise<void> => {
if (!issue) return;
try {
const comment = await handleIssueClosed();
const promotionCommnet = `\n<h6>If you enjoy the DevPool experience, please follow <a href="https://github.com/ubiquity">Ubiquity on GitHub</a> and star <a href="https://github.com/ubiquity/devpool-directory">this repo</a> to show your support. It helps a lot!</h6>`;
if (comment) await addCommentToIssue(comment + promotionCommnet, issue.number);
if (comment) await addCommentToIssue(comment + GLOBAL_STRINGS.promotionComment, issue.number);
} catch (err: unknown) {
return await addCommentToIssue(`Error: ${err}`, issue.number);
}
Expand Down

0 comments on commit d817e4a

Please sign in to comment.