Skip to content

Commit

Permalink
feat: add feature and bug as issue type
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jan 15, 2025
1 parent 72990f7 commit 311e52f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@ant-design/happy-work-theme": "^1.0.0",
"@ant-design/icons": "^4.2.1",
"antd": "^5.0.0",
"compare-versions": "^3.1.0",
"gh-pages": "^3.2.3",
"react": "^16.8.6",
"react": "^18.0.0",
"react-context-io": "^0.0.7",
"react-dom": "^16.8.6",
"react-dom": "^18.0.0",
"react-intl": "^2.4.0",
"react-scripts": "^3.0.0",
"react-scripts": "^5.0.0",
"remarkable": "^1.7.1",
"sass": "^1.49.9",
"whatwg-fetch": "^2.0.3"
Expand All @@ -37,7 +38,7 @@
"pretty-quick": "^2.0.1",
"reactive.macro": "^0.0.7",
"source-map-explorer": "^1.8.0",
"typescript": "^4.0.0"
"typescript": "^5.0.0"
},
"husky": {
"hooks": {
Expand Down
3 changes: 3 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from "react";
import { IntlProvider, addLocaleData } from "react-intl";
import { Layout, Button } from "antd";
import { HappyProvider } from '@ant-design/happy-work-theme';
import Intro from "./Intro";
import IssueForm from "./IssueForm";
import LocaleContext, { switchLocale } from "./LocaleContext";
Expand All @@ -16,6 +17,7 @@ const App: React.FC = () => {
addLocaleData(appLocale.data);

return (
<HappyProvider>
<LocaleContext.Provider>
<Layout className={styles.layout}>
<Header className={styles.header}>
Expand Down Expand Up @@ -59,6 +61,7 @@ const App: React.FC = () => {
</Footer>
</Layout>
</LocaleContext.Provider>
</HappyProvider>
);
};

Expand Down
4 changes: 1 addition & 3 deletions src/IssueForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,11 @@ const IssueForm: React.FC<{}> = () => {
issueType
)}\n\n<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->`;
const body = encodeURIComponent(withMarker).replace(/%2B/gi, "+");
const label =
issueType === "feature" ? "&labels=💡%20Feature%20Request" : "";

localStorage.clear();

window.open(
`https://github.com/ant-design/${repo}/issues/new?title=${title}&body=${body}${label}`
`https://github.com/ant-design/${repo}/issues/new?title=${title}&body=${body}&type=${issueType}`
);
}, [form, getContent]);

Expand Down

0 comments on commit 311e52f

Please sign in to comment.