You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
560 B
23 lines
560 B
import { asJson } from "utils/proxy/api-helpers";
|
|
import genericProxyHandler from "utils/proxy/handlers/generic";
|
|
|
|
const widget = {
|
|
api: "{url}/api/v1/{endpoint}?access_token={key}",
|
|
proxyHandler: genericProxyHandler,
|
|
|
|
mappings: {
|
|
notifications: {
|
|
endpoint: "notifications",
|
|
},
|
|
issues: {
|
|
endpoint: "repos/issues/search",
|
|
map: (data) => ({
|
|
pulls: asJson(data).filter((issue) => issue.pull_request),
|
|
issues: asJson(data).filter((issue) => !issue.pull_request),
|
|
}),
|
|
},
|
|
},
|
|
};
|
|
|
|
export default widget;
|