Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Oct 23, 2024
2 parents b266c0a + 2ee3785 commit d86df53
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
16 changes: 13 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"name": "Assistive pricing",
"description": "Handles assistive pricing, and allows for users to modify labels.",
"ubiquity:listeners": ["issues.labeled", "issues.unlabeled", "label.edited", "issue_comment.created", "push"],
"ubiquity:listeners": [
"repository.created",
"issues.opened",
"issues.labeled",
"issues.unlabeled",
"label.edited",
"issue_comment.created",
"push"
],
"commands": {
"allow": {
"ubiquity:example": "/allow @user1 label",
Expand All @@ -22,7 +30,9 @@
}
}
},
"required": ["excludeRepos"]
"required": [
"excludeRepos"
]
},
"labels": {
"default": {},
Expand Down Expand Up @@ -64,4 +74,4 @@
}
}
}
}
}
4 changes: 4 additions & 0 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export async function run(inputs: PluginInputs, env: Env) {

const eventName = inputs.eventName;
switch (eventName) {
case "issues.opened":
case "repository.created":
await syncPriceLabelsToConfig(context);
break;
case "issues.labeled":
case "issues.unlabeled":
if (isIssueLabelEvent(context)) {
Expand Down
2 changes: 1 addition & 1 deletion src/types/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createAdapters } from "../adapters";
import { Env } from "./env";
import { Logs } from "@ubiquity-os/ubiquity-os-logger";

export type SupportedEvents = "issues.labeled" | "issues.unlabeled" | "label.edited" | "issue_comment.created" | "push";
export type SupportedEvents = "repository.created" | "issues.labeled" | "issues.unlabeled" | "issues.opened" | "label.edited" | "issue_comment.created" | "push";

export interface Context<T extends SupportedEvents | "issue_comment" = SupportedEvents> {
eventName: T;
Expand Down

0 comments on commit d86df53

Please sign in to comment.