Skip to content

Commit

Permalink
update issue body
Browse files Browse the repository at this point in the history
  • Loading branch information
yujonglee committed Jun 8, 2024
1 parent 331bb01 commit 3152b9d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
const REPO_FULL_NAME = "BerriAI/litellm";
const DEFAULT_BRANCH = "main";
const RESOURCE_NAME = "model_prices_and_context_window.json";
const RESOURCE_BACKUP_NAME = "model_prices_and_context_window_backup.json";
const RESOURCE_PATH = `${RESOURCE_NAME}`;
const RESOURCE_BACKUP_PATH = `litellm/${RESOURCE_BACKUP_NAME}`;
const DEFAULT_QUERY = "gpt-4";
onMount(() => {
Expand Down Expand Up @@ -73,7 +75,14 @@
const getIssueUrlForAdd = (query: string) => {
const q = encodeURIComponent(query);
return `https://github.com/${REPO_FULL_NAME}/issues/new?labels=enhancement,fastrepl&title=Add+%22${q}%22+in+%22${RESOURCE_NAME}%22`;
const body = encodeURIComponent(
`Source: <SOURCE_URL>
We need to update both [${RESOURCE_NAME}](https://github.com/${REPO_FULL_NAME}/blob/${sha ?? DEFAULT_BRANCH}/${RESOURCE_PATH}) and [${RESOURCE_BACKUP_NAME}](https://github.com/${REPO_FULL_NAME}/blob/${sha ?? DEFAULT_BRANCH}/${RESOURCE_BACKUP_PATH}) to reflect the new model.
`,
);
return `https://github.com/${REPO_FULL_NAME}/issues/new?labels=enhancement,fastrepl&title=Add+%22${q}%22+in+%22${RESOURCE_NAME}%22&body=${body}`;
};
const getIssueUrlForFix = (name: string) => {
Expand All @@ -87,7 +96,10 @@
if (from > 0 && to > 0) {
const body = encodeURIComponent(
`${repo}/blob/${sha ?? DEFAULT_BRANCH}/${RESOURCE_PATH}#L${from}-L${to}`,
`${repo}/blob/${sha ?? DEFAULT_BRANCH}/${RESOURCE_PATH}#L${from}-L${to}
We also need to update [${RESOURCE_BACKUP_NAME}](https://github.com/${REPO_FULL_NAME}/blob/${sha ?? DEFAULT_BRANCH}/${RESOURCE_BACKUP_PATH}).
`,
);
return `${issue}&title=Fix+%22${name}%22+entry+in+%22${RESOURCE_NAME}%22&body=${body}`;
Expand Down

0 comments on commit 3152b9d

Please sign in to comment.