Skip to content

Commit

Permalink
Merge pull request #19 from ubiquibot/development
Browse files Browse the repository at this point in the history
Merge develop into main
  • Loading branch information
gentlementlegen authored Jul 25, 2024
2 parents f813070 + e4520b7 commit 7bd7518
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/knip-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ permissions: write-all
jobs:
knip-reporter:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion != 'success' }}
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -26,7 +27,6 @@ jobs:
trim: true

- name: Report knip results to pull request
if: ${{ github.event.workflow_run.conclusion != 'success' }}
uses: gitcoindev/knip-reporter@main
with:
verbose: true
Expand Down
10 changes: 10 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Assistive pricing",
"description": "Handles assistive pricing, and allows for users to modify labels.",
"commands": {
"allow": {
"ubiquity:example": "/allow @user1 label",
"description": "Allows the user to modify the given label."
}
}
}
9 changes: 9 additions & 0 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ import { Value } from "@sinclair/typebox/value";
import { run } from "./run";
import { Env, envConfigValidator } from "./types/env";
import { assistivePricingSettingsSchema } from "./types/plugin-input";
import manifest from "../manifest.json";

export default {
async fetch(request: Request, env: Env): Promise<Response> {
try {
if (request.method === "GET") {
const url = new URL(request.url);
if (url.pathname === "/manifest.json") {
return new Response(JSON.stringify(manifest), {
headers: { "content-type": "application/json" },
});
}
}
if (request.method !== "POST") {
return new Response(JSON.stringify({ error: `Only POST requests are supported.` }), {
status: 405,
Expand Down

0 comments on commit 7bd7518

Please sign in to comment.