@stoked-ui/github 0.0.0-a.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15014 -0
- package/GithubCalendar/GithubCalendar.d.ts +7 -0
- package/GithubCalendar/GithubCalendar.js +330 -0
- package/GithubCalendar/index.d.ts +2 -0
- package/GithubCalendar/index.js +2 -0
- package/GithubCalendar/package.json +6 -0
- package/GithubEvents/EventTypes/CreateEvent.d.ts +7 -0
- package/GithubEvents/EventTypes/CreateEvent.js +72 -0
- package/GithubEvents/EventTypes/DeleteEvent.d.ts +7 -0
- package/GithubEvents/EventTypes/DeleteEvent.js +65 -0
- package/GithubEvents/EventTypes/ForkEvent.d.ts +7 -0
- package/GithubEvents/EventTypes/ForkEvent.js +77 -0
- package/GithubEvents/EventTypes/IssueCommentEvent.d.ts +7 -0
- package/GithubEvents/EventTypes/IssueCommentEvent.js +210 -0
- package/GithubEvents/EventTypes/IssuesEvent.d.ts +7 -0
- package/GithubEvents/EventTypes/IssuesEvent.js +97 -0
- package/GithubEvents/EventTypes/ProjectsV2ColumnEvent.d.ts +7 -0
- package/GithubEvents/EventTypes/ProjectsV2ColumnEvent.js +69 -0
- package/GithubEvents/EventTypes/ProjectsV2Event.d.ts +7 -0
- package/GithubEvents/EventTypes/ProjectsV2Event.js +74 -0
- package/GithubEvents/EventTypes/ProjectsV2FieldEvent.d.ts +7 -0
- package/GithubEvents/EventTypes/ProjectsV2FieldEvent.js +77 -0
- package/GithubEvents/EventTypes/ProjectsV2ItemEvent.d.ts +7 -0
- package/GithubEvents/EventTypes/ProjectsV2ItemEvent.js +79 -0
- package/GithubEvents/EventTypes/PullRequest/CommitsList.d.ts +17 -0
- package/GithubEvents/EventTypes/PullRequest/CommitsList.js +99 -0
- package/GithubEvents/EventTypes/PullRequest/FileChanges.d.ts +17 -0
- package/GithubEvents/EventTypes/PullRequest/FileChanges.js +182 -0
- package/GithubEvents/EventTypes/PullRequest/PullRequestEvent.d.ts +8 -0
- package/GithubEvents/EventTypes/PullRequest/PullRequestEvent.js +374 -0
- package/GithubEvents/EventTypes/PullRequest/PullRequestView.d.ts +29 -0
- package/GithubEvents/EventTypes/PullRequest/PullRequestView.js +132 -0
- package/GithubEvents/EventTypes/PushEvent.d.ts +7 -0
- package/GithubEvents/EventTypes/PushEvent.js +106 -0
- package/GithubEvents/GithubEvents.d.ts +49 -0
- package/GithubEvents/GithubEvents.js +1454 -0
- package/GithubEvents/index.d.ts +2 -0
- package/GithubEvents/index.js +2 -0
- package/GithubEvents/package.json +6 -0
- package/LICENSE +21 -0
- package/README.md +29 -0
- package/apiHandlers/getPullRequestDetails.d.ts +7 -0
- package/apiHandlers/getPullRequestDetails.js +120 -0
- package/apiHandlers/index.d.ts +1 -0
- package/apiHandlers/index.js +1 -0
- package/apiHandlers/package.json +6 -0
- package/index.d.ts +3 -0
- package/index.js +10 -0
- package/modern/GithubCalendar/GithubCalendar.js +330 -0
- package/modern/GithubCalendar/index.js +2 -0
- package/modern/GithubEvents/EventTypes/CreateEvent.js +72 -0
- package/modern/GithubEvents/EventTypes/DeleteEvent.js +65 -0
- package/modern/GithubEvents/EventTypes/ForkEvent.js +77 -0
- package/modern/GithubEvents/EventTypes/IssueCommentEvent.js +210 -0
- package/modern/GithubEvents/EventTypes/IssuesEvent.js +97 -0
- package/modern/GithubEvents/EventTypes/ProjectsV2ColumnEvent.js +69 -0
- package/modern/GithubEvents/EventTypes/ProjectsV2Event.js +74 -0
- package/modern/GithubEvents/EventTypes/ProjectsV2FieldEvent.js +77 -0
- package/modern/GithubEvents/EventTypes/ProjectsV2ItemEvent.js +79 -0
- package/modern/GithubEvents/EventTypes/PullRequest/CommitsList.js +99 -0
- package/modern/GithubEvents/EventTypes/PullRequest/FileChanges.js +182 -0
- package/modern/GithubEvents/EventTypes/PullRequest/PullRequestEvent.js +374 -0
- package/modern/GithubEvents/EventTypes/PullRequest/PullRequestView.js +132 -0
- package/modern/GithubEvents/EventTypes/PushEvent.js +106 -0
- package/modern/GithubEvents/GithubEvents.js +1454 -0
- package/modern/GithubEvents/index.js +2 -0
- package/modern/apiHandlers/getPullRequestDetails.js +120 -0
- package/modern/apiHandlers/index.js +1 -0
- package/modern/index.js +10 -0
- package/modern/types/github.js +1 -0
- package/node/GithubCalendar/GithubCalendar.js +337 -0
- package/node/GithubCalendar/index.js +9 -0
- package/node/GithubEvents/EventTypes/CreateEvent.js +80 -0
- package/node/GithubEvents/EventTypes/DeleteEvent.js +73 -0
- package/node/GithubEvents/EventTypes/ForkEvent.js +85 -0
- package/node/GithubEvents/EventTypes/IssueCommentEvent.js +218 -0
- package/node/GithubEvents/EventTypes/IssuesEvent.js +105 -0
- package/node/GithubEvents/EventTypes/ProjectsV2ColumnEvent.js +77 -0
- package/node/GithubEvents/EventTypes/ProjectsV2Event.js +82 -0
- package/node/GithubEvents/EventTypes/ProjectsV2FieldEvent.js +85 -0
- package/node/GithubEvents/EventTypes/ProjectsV2ItemEvent.js +87 -0
- package/node/GithubEvents/EventTypes/PullRequest/CommitsList.js +107 -0
- package/node/GithubEvents/EventTypes/PullRequest/FileChanges.js +188 -0
- package/node/GithubEvents/EventTypes/PullRequest/PullRequestEvent.js +381 -0
- package/node/GithubEvents/EventTypes/PullRequest/PullRequestView.js +138 -0
- package/node/GithubEvents/EventTypes/PushEvent.js +114 -0
- package/node/GithubEvents/GithubEvents.js +1463 -0
- package/node/GithubEvents/index.js +9 -0
- package/node/apiHandlers/getPullRequestDetails.js +127 -0
- package/node/apiHandlers/index.js +13 -0
- package/node/index.js +27 -0
- package/node/types/github.js +5 -0
- package/package.json +71 -0
- package/types/github.d.ts +107 -0
- package/types/github.js +1 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = ForkEvent;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
10
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
11
|
+
var _Link = _interopRequireDefault(require("@mui/material/Link"));
|
|
12
|
+
var _Chip2 = _interopRequireDefault(require("@mui/material/Chip"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
var _Chip;
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
+
function ForkEvent({
|
|
17
|
+
event
|
|
18
|
+
}) {
|
|
19
|
+
var _event$payload;
|
|
20
|
+
if (!(event != null && event.date)) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const forkee = (_event$payload = event.payload) == null ? void 0 : _event$payload.forkee;
|
|
24
|
+
if (!forkee) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const forkUrl = forkee.html_url;
|
|
28
|
+
const forkName = forkee.full_name;
|
|
29
|
+
const originalRepo = event.repo;
|
|
30
|
+
const description = forkee.description;
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
32
|
+
sx: {
|
|
33
|
+
p: '16px'
|
|
34
|
+
},
|
|
35
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
36
|
+
sx: {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
gap: 1,
|
|
40
|
+
mb: 2
|
|
41
|
+
},
|
|
42
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
43
|
+
variant: "caption",
|
|
44
|
+
color: "text.secondary",
|
|
45
|
+
children: event.date
|
|
46
|
+
}), _Chip || (_Chip = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip2.default, {
|
|
47
|
+
label: "fork",
|
|
48
|
+
size: "small",
|
|
49
|
+
color: "info"
|
|
50
|
+
}))]
|
|
51
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
52
|
+
variant: "h6",
|
|
53
|
+
component: "h3",
|
|
54
|
+
sx: {
|
|
55
|
+
mb: 1
|
|
56
|
+
},
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
58
|
+
href: forkUrl,
|
|
59
|
+
target: "_blank",
|
|
60
|
+
rel: "noopener noreferrer",
|
|
61
|
+
sx: {
|
|
62
|
+
textDecoration: 'none'
|
|
63
|
+
},
|
|
64
|
+
children: forkName
|
|
65
|
+
})
|
|
66
|
+
}), description && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
67
|
+
variant: "body2",
|
|
68
|
+
sx: {
|
|
69
|
+
mb: 2
|
|
70
|
+
},
|
|
71
|
+
children: description
|
|
72
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
73
|
+
sx: {
|
|
74
|
+
display: 'flex',
|
|
75
|
+
alignItems: 'center',
|
|
76
|
+
gap: 1
|
|
77
|
+
},
|
|
78
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
|
|
79
|
+
variant: "body2",
|
|
80
|
+
color: "text.secondary",
|
|
81
|
+
children: ["Forked from ", originalRepo]
|
|
82
|
+
})
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = IssueCommentEvent;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
10
|
+
var _Typography3 = _interopRequireDefault(require("@mui/material/Typography"));
|
|
11
|
+
var _Link = _interopRequireDefault(require("@mui/material/Link"));
|
|
12
|
+
var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
|
|
13
|
+
var _Avatar = _interopRequireDefault(require("@mui/material/Avatar"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
var _Typography, _Typography2;
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
|
+
function IssueCommentEvent({
|
|
18
|
+
event
|
|
19
|
+
}) {
|
|
20
|
+
var _event$payload, _event$payload2, _issue$user, _issue$user2, _comment$user, _comment$user2, _event$payload3;
|
|
21
|
+
if (!(event != null && event.date)) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
const issue = (_event$payload = event.payload) == null ? void 0 : _event$payload.issue;
|
|
25
|
+
const comment = (_event$payload2 = event.payload) == null ? void 0 : _event$payload2.comment;
|
|
26
|
+
if (!issue || !comment) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Extract repository information
|
|
31
|
+
const repoFullName = event.repo;
|
|
32
|
+
const [repoOwner, repoName] = repoFullName.split('/');
|
|
33
|
+
|
|
34
|
+
// Extract issue information
|
|
35
|
+
const issueTitle = issue.title;
|
|
36
|
+
const issueUrl = issue.html_url;
|
|
37
|
+
const issueState = issue.state || 'unknown';
|
|
38
|
+
const issueNumber = issue.number;
|
|
39
|
+
const issueAuthor = (_issue$user = issue.user) == null ? void 0 : _issue$user.login;
|
|
40
|
+
const issueAuthorAvatar = (_issue$user2 = issue.user) == null ? void 0 : _issue$user2.avatar_url;
|
|
41
|
+
|
|
42
|
+
// Extract comment information
|
|
43
|
+
const commentUrl = comment.html_url;
|
|
44
|
+
const commentBody = comment.body;
|
|
45
|
+
const commentUser = ((_comment$user = comment.user) == null ? void 0 : _comment$user.login) || event.user;
|
|
46
|
+
const commentUserAvatar = ((_comment$user2 = comment.user) == null ? void 0 : _comment$user2.avatar_url) || event.avatarUrl;
|
|
47
|
+
const commentCreatedAt = comment.created_at || event.date;
|
|
48
|
+
|
|
49
|
+
// Get other comments if available
|
|
50
|
+
const otherComments = ((_event$payload3 = event.payload) == null ? void 0 : _event$payload3.comments) || [];
|
|
51
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
52
|
+
sx: {
|
|
53
|
+
p: '16px'
|
|
54
|
+
},
|
|
55
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
56
|
+
sx: {
|
|
57
|
+
display: 'flex',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
gap: 1,
|
|
60
|
+
mb: 2
|
|
61
|
+
},
|
|
62
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography3.default, {
|
|
63
|
+
variant: "caption",
|
|
64
|
+
color: "text.secondary",
|
|
65
|
+
children: event.date
|
|
66
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
67
|
+
label: `${repoOwner}/${repoName}`,
|
|
68
|
+
size: "small",
|
|
69
|
+
color: "primary",
|
|
70
|
+
variant: "outlined"
|
|
71
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
72
|
+
label: `#${issueNumber}`,
|
|
73
|
+
size: "small",
|
|
74
|
+
color: "default"
|
|
75
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
76
|
+
label: issueState,
|
|
77
|
+
size: "small",
|
|
78
|
+
color: issueState === 'open' ? 'success' : 'error'
|
|
79
|
+
})]
|
|
80
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography3.default, {
|
|
81
|
+
variant: "h6",
|
|
82
|
+
component: "h3",
|
|
83
|
+
sx: {
|
|
84
|
+
mb: 1
|
|
85
|
+
},
|
|
86
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
87
|
+
href: issueUrl,
|
|
88
|
+
target: "_blank",
|
|
89
|
+
rel: "noopener noreferrer",
|
|
90
|
+
sx: {
|
|
91
|
+
textDecoration: 'none'
|
|
92
|
+
},
|
|
93
|
+
children: issueTitle
|
|
94
|
+
})
|
|
95
|
+
}), issueAuthor && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
96
|
+
sx: {
|
|
97
|
+
display: 'flex',
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
gap: 1,
|
|
100
|
+
mb: 2
|
|
101
|
+
},
|
|
102
|
+
children: [_Typography || (_Typography = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography3.default, {
|
|
103
|
+
variant: "body2",
|
|
104
|
+
color: "text.secondary",
|
|
105
|
+
children: "Issue by:"
|
|
106
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
107
|
+
src: issueAuthorAvatar,
|
|
108
|
+
alt: issueAuthor,
|
|
109
|
+
sx: {
|
|
110
|
+
width: 20,
|
|
111
|
+
height: 20
|
|
112
|
+
}
|
|
113
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography3.default, {
|
|
114
|
+
variant: "body2",
|
|
115
|
+
children: issueAuthor
|
|
116
|
+
})]
|
|
117
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
118
|
+
sx: {
|
|
119
|
+
display: 'flex',
|
|
120
|
+
alignItems: 'center',
|
|
121
|
+
gap: 1,
|
|
122
|
+
mb: 2
|
|
123
|
+
},
|
|
124
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
125
|
+
src: commentUserAvatar,
|
|
126
|
+
alt: commentUser,
|
|
127
|
+
sx: {
|
|
128
|
+
width: 24,
|
|
129
|
+
height: 24
|
|
130
|
+
}
|
|
131
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography3.default, {
|
|
132
|
+
variant: "body2",
|
|
133
|
+
children: commentUser
|
|
134
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography3.default, {
|
|
135
|
+
variant: "body2",
|
|
136
|
+
color: "text.secondary",
|
|
137
|
+
children: ["commented on ", new Date(commentCreatedAt).toLocaleString()]
|
|
138
|
+
})]
|
|
139
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
140
|
+
sx: {
|
|
141
|
+
p: '16px',
|
|
142
|
+
backgroundColor: 'action.hover',
|
|
143
|
+
borderRadius: 1,
|
|
144
|
+
position: 'relative',
|
|
145
|
+
mb: 2
|
|
146
|
+
},
|
|
147
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography3.default, {
|
|
148
|
+
variant: "body2",
|
|
149
|
+
sx: {
|
|
150
|
+
whiteSpace: 'pre-wrap',
|
|
151
|
+
maxHeight: 200,
|
|
152
|
+
overflow: 'auto'
|
|
153
|
+
},
|
|
154
|
+
children: commentBody
|
|
155
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
156
|
+
sx: {
|
|
157
|
+
position: 'absolute',
|
|
158
|
+
top: 8,
|
|
159
|
+
right: 8
|
|
160
|
+
},
|
|
161
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
162
|
+
href: commentUrl,
|
|
163
|
+
target: "_blank",
|
|
164
|
+
rel: "noopener noreferrer",
|
|
165
|
+
sx: {
|
|
166
|
+
textDecoration: 'none',
|
|
167
|
+
fontSize: '0.75rem'
|
|
168
|
+
},
|
|
169
|
+
children: "View on GitHub"
|
|
170
|
+
})
|
|
171
|
+
})]
|
|
172
|
+
}), otherComments.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
173
|
+
sx: {
|
|
174
|
+
mt: 2
|
|
175
|
+
},
|
|
176
|
+
children: [_Typography2 || (_Typography2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography3.default, {
|
|
177
|
+
variant: "subtitle2",
|
|
178
|
+
gutterBottom: true,
|
|
179
|
+
children: "Other comments on this issue:"
|
|
180
|
+
})), otherComments.slice(0, 3).map(otherComment => {
|
|
181
|
+
var _otherComment$user, _otherComment$user2, _otherComment$user3, _otherComment$body, _otherComment$body2;
|
|
182
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
183
|
+
sx: {
|
|
184
|
+
display: 'flex',
|
|
185
|
+
alignItems: 'center',
|
|
186
|
+
gap: 1,
|
|
187
|
+
mb: 1
|
|
188
|
+
},
|
|
189
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
|
|
190
|
+
src: (_otherComment$user = otherComment.user) == null ? void 0 : _otherComment$user.avatar_url,
|
|
191
|
+
alt: (_otherComment$user2 = otherComment.user) == null ? void 0 : _otherComment$user2.login,
|
|
192
|
+
sx: {
|
|
193
|
+
width: 20,
|
|
194
|
+
height: 20
|
|
195
|
+
}
|
|
196
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography3.default, {
|
|
197
|
+
variant: "body2",
|
|
198
|
+
children: (_otherComment$user3 = otherComment.user) == null ? void 0 : _otherComment$user3.login
|
|
199
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography3.default, {
|
|
200
|
+
variant: "body2",
|
|
201
|
+
color: "text.secondary",
|
|
202
|
+
sx: {
|
|
203
|
+
flexGrow: 1,
|
|
204
|
+
overflow: 'hidden',
|
|
205
|
+
textOverflow: 'ellipsis',
|
|
206
|
+
whiteSpace: 'nowrap'
|
|
207
|
+
},
|
|
208
|
+
children: [(_otherComment$body = otherComment.body) == null ? void 0 : _otherComment$body.substring(0, 50), ((_otherComment$body2 = otherComment.body) == null ? void 0 : _otherComment$body2.length) > 50 ? '...' : '']
|
|
209
|
+
})]
|
|
210
|
+
}, otherComment.id);
|
|
211
|
+
}), otherComments.length > 3 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography3.default, {
|
|
212
|
+
variant: "caption",
|
|
213
|
+
color: "text.secondary",
|
|
214
|
+
children: ["+", otherComments.length - 3, " more comments"]
|
|
215
|
+
})]
|
|
216
|
+
})]
|
|
217
|
+
});
|
|
218
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = IssuesEvent;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
10
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
11
|
+
var _Link = _interopRequireDefault(require("@mui/material/Link"));
|
|
12
|
+
var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
function IssuesEvent({
|
|
16
|
+
event
|
|
17
|
+
}) {
|
|
18
|
+
var _event$payload, _event$payload2, _issue$user;
|
|
19
|
+
if (!(event != null && event.date)) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const issue = (_event$payload = event.payload) == null ? void 0 : _event$payload.issue;
|
|
23
|
+
if (!issue) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const issueTitle = issue.title || event.description;
|
|
27
|
+
const issueUrl = issue.html_url || event.url;
|
|
28
|
+
const issueState = issue.state || 'unknown';
|
|
29
|
+
const issueAction = ((_event$payload2 = event.payload) == null ? void 0 : _event$payload2.action) || 'unknown';
|
|
30
|
+
const issueNumber = issue.number || event.number;
|
|
31
|
+
const issueUser = ((_issue$user = issue.user) == null ? void 0 : _issue$user.login) || event.user;
|
|
32
|
+
const issueComments = issue.comments || event.comments;
|
|
33
|
+
const issueLabels = issue.labels || [];
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
35
|
+
sx: {
|
|
36
|
+
p: '16px'
|
|
37
|
+
},
|
|
38
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
39
|
+
sx: {
|
|
40
|
+
display: 'flex',
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
gap: 1,
|
|
43
|
+
mb: 2
|
|
44
|
+
},
|
|
45
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
46
|
+
variant: "caption",
|
|
47
|
+
color: "text.secondary",
|
|
48
|
+
children: event.date
|
|
49
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
50
|
+
label: `#${issueNumber}`,
|
|
51
|
+
size: "small",
|
|
52
|
+
color: "default"
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
54
|
+
label: issueState,
|
|
55
|
+
size: "small",
|
|
56
|
+
color: issueState === 'open' ? 'success' : 'error'
|
|
57
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
58
|
+
label: `${issueComments} comment${issueComments !== 1 ? 's' : ''}`,
|
|
59
|
+
size: "small",
|
|
60
|
+
color: "default"
|
|
61
|
+
})]
|
|
62
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
63
|
+
variant: "h6",
|
|
64
|
+
component: "h3",
|
|
65
|
+
sx: {
|
|
66
|
+
mb: 1
|
|
67
|
+
},
|
|
68
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
69
|
+
href: issueUrl,
|
|
70
|
+
target: "_blank",
|
|
71
|
+
rel: "noopener noreferrer",
|
|
72
|
+
sx: {
|
|
73
|
+
textDecoration: 'none'
|
|
74
|
+
},
|
|
75
|
+
children: issueTitle
|
|
76
|
+
})
|
|
77
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
78
|
+
sx: {
|
|
79
|
+
display: 'flex',
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
gap: 1,
|
|
82
|
+
mb: issueLabels.length > 0 ? 2 : 0
|
|
83
|
+
},
|
|
84
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
|
|
85
|
+
variant: "body2",
|
|
86
|
+
color: "text.secondary",
|
|
87
|
+
children: [issueAction, " by ", issueUser]
|
|
88
|
+
})
|
|
89
|
+
}), issueLabels.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
90
|
+
sx: {
|
|
91
|
+
display: 'flex',
|
|
92
|
+
flexWrap: 'wrap',
|
|
93
|
+
gap: 1
|
|
94
|
+
},
|
|
95
|
+
children: issueLabels.map(label => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
96
|
+
label: label.name,
|
|
97
|
+
size: "small",
|
|
98
|
+
sx: {
|
|
99
|
+
backgroundColor: `#${label.color}`,
|
|
100
|
+
color: label.color === 'ffffff' ? 'text.primary' : '#fff'
|
|
101
|
+
}
|
|
102
|
+
}, label.name))
|
|
103
|
+
})]
|
|
104
|
+
});
|
|
105
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = ProjectsV2ColumnEvent;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
10
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
11
|
+
var _Chip2 = _interopRequireDefault(require("@mui/material/Chip"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
var _Chip;
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
function ProjectsV2ColumnEvent({
|
|
16
|
+
event
|
|
17
|
+
}) {
|
|
18
|
+
var _event$payload, _event$payload2;
|
|
19
|
+
if (!(event != null && event.date)) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const column = (_event$payload = event.payload) == null ? void 0 : _event$payload.projects_v2_column;
|
|
23
|
+
const action = (_event$payload2 = event.payload) == null ? void 0 : _event$payload2.action;
|
|
24
|
+
if (!column) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const columnName = column.name || 'Untitled Column';
|
|
28
|
+
const projectNumber = column.project_number;
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
30
|
+
sx: {
|
|
31
|
+
p: '16px'
|
|
32
|
+
},
|
|
33
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
34
|
+
sx: {
|
|
35
|
+
display: 'flex',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
gap: 1,
|
|
38
|
+
mb: 2
|
|
39
|
+
},
|
|
40
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
41
|
+
variant: "caption",
|
|
42
|
+
color: "text.secondary",
|
|
43
|
+
children: event.date
|
|
44
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip2.default, {
|
|
45
|
+
label: `Project #${projectNumber}`,
|
|
46
|
+
size: "small",
|
|
47
|
+
color: "default"
|
|
48
|
+
}), _Chip || (_Chip = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip2.default, {
|
|
49
|
+
label: "column",
|
|
50
|
+
size: "small",
|
|
51
|
+
color: "info"
|
|
52
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip2.default, {
|
|
53
|
+
label: action,
|
|
54
|
+
size: "small",
|
|
55
|
+
color: action === 'created' ? 'success' : action === 'deleted' ? 'error' : 'primary'
|
|
56
|
+
})]
|
|
57
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
58
|
+
variant: "h6",
|
|
59
|
+
component: "h3",
|
|
60
|
+
sx: {
|
|
61
|
+
mb: 1
|
|
62
|
+
},
|
|
63
|
+
children: columnName
|
|
64
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
65
|
+
sx: {
|
|
66
|
+
display: 'flex',
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
gap: 1
|
|
69
|
+
},
|
|
70
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
|
|
71
|
+
variant: "body2",
|
|
72
|
+
color: "text.secondary",
|
|
73
|
+
children: ["Column ", action, " in project #", projectNumber]
|
|
74
|
+
})
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = ProjectsV2Event;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
10
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
11
|
+
var _Link = _interopRequireDefault(require("@mui/material/Link"));
|
|
12
|
+
var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
function ProjectsV2Event({
|
|
16
|
+
event
|
|
17
|
+
}) {
|
|
18
|
+
var _event$payload, _event$payload2;
|
|
19
|
+
if (!(event != null && event.date)) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const project = (_event$payload = event.payload) == null ? void 0 : _event$payload.projects_v2;
|
|
23
|
+
const action = (_event$payload2 = event.payload) == null ? void 0 : _event$payload2.action;
|
|
24
|
+
if (!project) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const projectTitle = project.title || 'Untitled Project';
|
|
28
|
+
const projectUrl = project.html_url || `https://github.com/${event.repo}/projects`;
|
|
29
|
+
const projectNumber = project.number;
|
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
31
|
+
sx: {
|
|
32
|
+
p: '16px'
|
|
33
|
+
},
|
|
34
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
35
|
+
sx: {
|
|
36
|
+
display: 'flex',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
gap: 1,
|
|
39
|
+
mb: 2
|
|
40
|
+
},
|
|
41
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
42
|
+
variant: "caption",
|
|
43
|
+
color: "text.secondary",
|
|
44
|
+
children: event.date
|
|
45
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
46
|
+
label: `#${projectNumber}`,
|
|
47
|
+
size: "small",
|
|
48
|
+
color: "default"
|
|
49
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, {
|
|
50
|
+
label: action,
|
|
51
|
+
size: "small",
|
|
52
|
+
color: action === 'created' ? 'success' : action === 'deleted' ? 'error' : 'primary'
|
|
53
|
+
})]
|
|
54
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
55
|
+
variant: "h6",
|
|
56
|
+
component: "h3",
|
|
57
|
+
sx: {
|
|
58
|
+
mb: 1
|
|
59
|
+
},
|
|
60
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
61
|
+
href: projectUrl,
|
|
62
|
+
target: "_blank",
|
|
63
|
+
rel: "noopener noreferrer",
|
|
64
|
+
sx: {
|
|
65
|
+
textDecoration: 'none'
|
|
66
|
+
},
|
|
67
|
+
children: projectTitle
|
|
68
|
+
})
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
70
|
+
sx: {
|
|
71
|
+
display: 'flex',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
gap: 1
|
|
74
|
+
},
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
|
|
76
|
+
variant: "body2",
|
|
77
|
+
color: "text.secondary",
|
|
78
|
+
children: ["Project ", action, " in ", event.repo]
|
|
79
|
+
})
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
82
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = ProjectsV2FieldEvent;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
10
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
11
|
+
var _Chip2 = _interopRequireDefault(require("@mui/material/Chip"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
var _Chip;
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
function ProjectsV2FieldEvent({
|
|
16
|
+
event
|
|
17
|
+
}) {
|
|
18
|
+
var _event$payload, _event$payload2;
|
|
19
|
+
if (!(event != null && event.date)) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const field = (_event$payload = event.payload) == null ? void 0 : _event$payload.projects_v2_field;
|
|
23
|
+
const action = (_event$payload2 = event.payload) == null ? void 0 : _event$payload2.action;
|
|
24
|
+
if (!field) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const fieldName = field.name || 'Untitled Field';
|
|
28
|
+
const projectNumber = field.project_number;
|
|
29
|
+
const fieldType = field.data_type || 'Unknown Type';
|
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
31
|
+
sx: {
|
|
32
|
+
p: '16px'
|
|
33
|
+
},
|
|
34
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
|
|
35
|
+
sx: {
|
|
36
|
+
display: 'flex',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
gap: 1,
|
|
39
|
+
mb: 2
|
|
40
|
+
},
|
|
41
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
42
|
+
variant: "caption",
|
|
43
|
+
color: "text.secondary",
|
|
44
|
+
children: event.date
|
|
45
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip2.default, {
|
|
46
|
+
label: `Project #${projectNumber}`,
|
|
47
|
+
size: "small",
|
|
48
|
+
color: "default"
|
|
49
|
+
}), _Chip || (_Chip = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip2.default, {
|
|
50
|
+
label: "field",
|
|
51
|
+
size: "small",
|
|
52
|
+
color: "info"
|
|
53
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip2.default, {
|
|
54
|
+
label: action,
|
|
55
|
+
size: "small",
|
|
56
|
+
color: action === 'created' ? 'success' : action === 'deleted' ? 'error' : 'primary'
|
|
57
|
+
})]
|
|
58
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
59
|
+
variant: "h6",
|
|
60
|
+
component: "h3",
|
|
61
|
+
sx: {
|
|
62
|
+
mb: 1
|
|
63
|
+
},
|
|
64
|
+
children: fieldName
|
|
65
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
|
|
66
|
+
sx: {
|
|
67
|
+
display: 'flex',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
gap: 1
|
|
70
|
+
},
|
|
71
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
|
|
72
|
+
variant: "body2",
|
|
73
|
+
color: "text.secondary",
|
|
74
|
+
children: ["Field type: ", fieldType]
|
|
75
|
+
})
|
|
76
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography.default, {
|
|
77
|
+
variant: "body2",
|
|
78
|
+
color: "text.secondary",
|
|
79
|
+
sx: {
|
|
80
|
+
mt: 1
|
|
81
|
+
},
|
|
82
|
+
children: ["Field ", action, " in project #", projectNumber]
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
}
|