chore: update issue url to use discussion

This commit is contained in:
Stephen Zhou 2024-11-22 19:36:59 +08:00
parent edd4f9e5a6
commit e730189f6b
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -7,10 +7,12 @@ interface IssueOptions {
label: string
error?: Error
}
export const getNewIssueUrl = ({ body, label, title, error }: Partial<IssueOptions> = {}) => {
const baseUrl = `${repository.url}/issues/new`
const baseUrl = `${repository.url}/discussions/new`
const searchParams = new URLSearchParams()
searchParams.set("category", "feed-expired")
let nextBody = [body || "", "", ...getCurrentEnvironment()].join("\n")
if (label) searchParams.set("label", label)