@backstage-community/plugin-azure-devops 0.6.2 → 0.7.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 +17 -0
- package/dist/alpha/plugin.esm.js.map +1 -1
- package/dist/alpha.d.ts +12 -12
- package/dist/api/AzureDevOpsApi.esm.js.map +1 -1
- package/dist/api/AzureDevOpsClient.esm.js.map +1 -1
- package/dist/components/AzureGitTagsIcon/AzureGitTagsIcon.esm.js +1 -1
- package/dist/components/AzureGitTagsIcon/AzureGitTagsIcon.esm.js.map +1 -1
- package/dist/components/AzurePipelinesIcon/AzurePipelinesIcon.esm.js +1 -1
- package/dist/components/AzurePipelinesIcon/AzurePipelinesIcon.esm.js.map +1 -1
- package/dist/components/AzurePullRequestsIcon/AzurePullRequestsIcon.esm.js +1 -1
- package/dist/components/AzurePullRequestsIcon/AzurePullRequestsIcon.esm.js.map +1 -1
- package/dist/components/BuildTable/BuildTable.esm.js +2 -2
- package/dist/components/BuildTable/BuildTable.esm.js.map +1 -1
- package/dist/components/EntityPageAzureGitTags/EntityPageAzureGitTags.esm.js.map +1 -1
- package/dist/components/EntityPageAzurePipelines/EntityPageAzurePipelines.esm.js.map +1 -1
- package/dist/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.esm.js.map +1 -1
- package/dist/components/GitTagTable/GitTagTable.esm.js +1 -1
- package/dist/components/GitTagTable/GitTagTable.esm.js.map +1 -1
- package/dist/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.esm.js +5 -5
- package/dist/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.esm.js.map +1 -1
- package/dist/components/PullRequestTable/PullRequestTable.esm.js +2 -2
- package/dist/components/PullRequestTable/PullRequestTable.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/PullRequestsPage.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.esm.js +2 -2
- package/dist/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.esm.js +6 -6
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.esm.js +5 -6
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.esm.js +1 -1
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js +1 -1
- package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.esm.js +1 -1
- package/dist/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js +4 -5
- package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/filters/allFilter.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/filters/assignedToTeamFilter.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/filters/assignedToUserFilter.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/filters/createFilter.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/filters/createdByTeamFilter.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/filters/createdByTeamsFilter.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/filters/createdByUserFilter.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/filters/types.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/hooks/useFilterProcessor.esm.js.map +1 -1
- package/dist/components/PullRequestsPage/lib/utils.esm.js.map +1 -1
- package/dist/components/ReadmeCard/ReadmeCard.esm.js +3 -3
- package/dist/components/ReadmeCard/ReadmeCard.esm.js.map +1 -1
- package/dist/hooks/useBuildRuns.esm.js.map +1 -1
- package/dist/hooks/useDashboardPullRequests.esm.js.map +1 -1
- package/dist/hooks/useGitTags.esm.js.map +1 -1
- package/dist/hooks/usePullRequests.esm.js.map +1 -1
- package/dist/hooks/useReadme.esm.js.map +1 -1
- package/dist/hooks/useUserEmail.esm.js.map +1 -1
- package/dist/hooks/useUserTeamIds.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/plugin.esm.js.map +1 -1
- package/dist/routes.esm.js.map +1 -1
- package/dist/utils/arrayHas.esm.js.map +1 -1
- package/dist/utils/equalsIgnoreCase.esm.js.map +1 -1
- package/dist/utils/getAnnotationValuesFromEntity.esm.js.map +1 -1
- package/dist/utils/getDurationFromDates.esm.js.map +1 -1
- package/package.json +26 -18
- package/alpha/package.json +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoCompleteIcon.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport DoneAllIcon from '@
|
|
1
|
+
{"version":3,"file":"AutoCompleteIcon.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport DoneAllIcon from '@material-ui/icons/DoneAll';\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(theme => ({\n root: (props: { hasAutoComplete: boolean }) => ({\n color: props.hasAutoComplete\n ? theme.palette.success.main\n : theme.palette.grey[400],\n }),\n}));\n\nexport const AutoCompleteIcon = (props: { hasAutoComplete: boolean }) => {\n const classes = useStyles(props);\n return <DoneAllIcon className={classes.root} />;\n};\n"],"names":[],"mappings":";;;;AAoBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAA,EAAM,CAAC,KAAyC,MAAA;AAAA,IAC9C,KAAA,EAAO,KAAM,CAAA,eAAA,GACT,KAAM,CAAA,OAAA,CAAQ,QAAQ,IACtB,GAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,GAAG;AAAA,GAC5B;AACF,CAAE,CAAA,CAAA;AAEW,MAAA,gBAAA,GAAmB,CAAC,KAAwC,KAAA;AACvE,EAAM,MAAA,OAAA,GAAU,UAAU,KAAK,CAAA;AAC/B,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,EAAY,SAAW,EAAA,OAAA,CAAQ,IAAM,EAAA,CAAA;AAC/C;;;;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Link, Avatar } from '@backstage/core-components';
|
|
2
|
-
import Card from '@
|
|
3
|
-
import CardContent from '@
|
|
4
|
-
import CardHeader from '@
|
|
5
|
-
import Typography from '@
|
|
2
|
+
import Card from '@material-ui/core/Card';
|
|
3
|
+
import CardContent from '@material-ui/core/CardContent';
|
|
4
|
+
import CardHeader from '@material-ui/core/CardHeader';
|
|
5
|
+
import Typography from '@material-ui/core/Typography';
|
|
6
6
|
import { AutoCompleteIcon } from '../AutoCompleteIcon/AutoCompleteIcon.esm.js';
|
|
7
7
|
import { DateTime } from 'luxon';
|
|
8
8
|
import { PullRequestCardPolicies } from './PullRequestCardPolicies.esm.js';
|
|
9
9
|
import { PullRequestCardReviewers } from './PullRequestCardReviewers.esm.js';
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import makeStyles from '@
|
|
11
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
12
12
|
|
|
13
13
|
const useStyles = makeStyles(
|
|
14
14
|
(theme) => ({
|
|
15
15
|
card: {
|
|
16
|
-
backgroundColor: theme.palette.
|
|
16
|
+
backgroundColor: theme.palette.type === "dark" ? theme.palette.grey[700] : theme.palette.common.white
|
|
17
17
|
},
|
|
18
18
|
cardHeaderSimplified: {
|
|
19
19
|
paddingBottom: theme.spacing(2)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestCard.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Avatar, Link } from '@backstage/core-components';\nimport Card from '@
|
|
1
|
+
{"version":3,"file":"PullRequestCard.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Avatar, Link } from '@backstage/core-components';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Typography from '@material-ui/core/Typography';\n\nimport { AutoCompleteIcon } from '../AutoCompleteIcon';\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { DateTime } from 'luxon';\nimport { PullRequestCardPolicies } from './PullRequestCardPolicies';\nimport { PullRequestCardReviewers } from './PullRequestCardReviewers';\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(\n theme => ({\n card: {\n backgroundColor:\n theme.palette.type === 'dark'\n ? theme.palette.grey[700]\n : theme.palette.common.white,\n },\n cardHeaderSimplified: {\n paddingBottom: theme.spacing(2),\n },\n cardHeaderAction: {\n display: 'flex',\n alignSelf: 'center',\n margin: 0,\n },\n content: {\n display: 'flex',\n flexDirection: 'row',\n },\n policies: {\n flex: 1,\n },\n avatar: { width: '2.5rem', height: '2.5rem' },\n avatarText: { fontSize: '1rem' },\n }),\n { name: 'PullRequestCard' },\n);\n\ntype PullRequestCardProps = {\n pullRequest: DashboardPullRequest;\n simplified?: boolean;\n};\n\nexport const PullRequestCard = ({\n pullRequest,\n simplified,\n}: PullRequestCardProps) => {\n const classes = useStyles();\n\n const title = (\n <Link to={pullRequest.link ?? ''} title={pullRequest.description}>\n {pullRequest.title}\n </Link>\n );\n\n const repoLink = (\n <Link to={pullRequest.repository?.url ?? ''} color=\"inherit\">\n {pullRequest.repository?.name}\n </Link>\n );\n\n const creationDate = pullRequest.creationDate\n ? DateTime.fromISO(pullRequest.creationDate).toRelative()\n : undefined;\n\n const subheader = (\n <Typography component=\"span\">\n {repoLink} · {creationDate}\n </Typography>\n );\n\n const avatar = (\n <Avatar\n displayName={pullRequest.createdBy?.displayName}\n picture={pullRequest.createdBy?.imageUrl}\n classes={{ avatar: classes.avatar, avatarText: classes.avatarText }}\n />\n );\n\n return (\n <Card\n classes={{ root: classes.card }}\n data-pull-request-id={pullRequest.pullRequestId}\n >\n <CardHeader\n avatar={avatar}\n title={title}\n subheader={subheader}\n action={\n <AutoCompleteIcon hasAutoComplete={pullRequest.hasAutoComplete} />\n }\n classes={{\n ...(simplified && { root: classes.cardHeaderSimplified }),\n action: classes.cardHeaderAction,\n }}\n />\n\n {!simplified && (\n <CardContent className={classes.content}>\n {pullRequest.policies && (\n <PullRequestCardPolicies\n policies={pullRequest.policies}\n className={classes.policies}\n />\n )}\n\n {pullRequest.reviewers && (\n <PullRequestCardReviewers reviewers={pullRequest.reviewers} />\n )}\n </CardContent>\n )}\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,eACE,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,MACnB,GAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAA,GACtB,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA;AAAA,KAC7B;AAAA,IACA,oBAAsB,EAAA;AAAA,MACpB,aAAA,EAAe,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA,KAChC;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,OAAS,EAAA,MAAA;AAAA,MACT,SAAW,EAAA,QAAA;AAAA,MACX,MAAQ,EAAA;AAAA,KACV;AAAA,IACA,OAAS,EAAA;AAAA,MACP,OAAS,EAAA,MAAA;AAAA,MACT,aAAe,EAAA;AAAA,KACjB;AAAA,IACA,QAAU,EAAA;AAAA,MACR,IAAM,EAAA;AAAA,KACR;AAAA,IACA,MAAQ,EAAA,EAAE,KAAO,EAAA,QAAA,EAAU,QAAQ,QAAS,EAAA;AAAA,IAC5C,UAAA,EAAY,EAAE,QAAA,EAAU,MAAO;AAAA,GACjC,CAAA;AAAA,EACA,EAAE,MAAM,iBAAkB;AAC5B,CAAA;AAOO,MAAM,kBAAkB,CAAC;AAAA,EAC9B,WAAA;AAAA,EACA;AACF,CAA4B,KAAA;AAC1B,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EAAM,MAAA,KAAA,mBACH,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,EAAI,EAAA,WAAA,CAAY,IAAQ,IAAA,EAAA,EAAI,KAAO,EAAA,WAAA,CAAY,WAClD,EAAA,EAAA,WAAA,CAAY,KACf,CAAA;AAGF,EAAA,MAAM,QACJ,mBAAA,KAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,EAAA,EAAI,WAAY,CAAA,UAAA,EAAY,GAAO,IAAA,EAAA,EAAI,KAAM,EAAA,SAAA,EAAA,EAChD,WAAY,CAAA,UAAA,EAAY,IAC3B,CAAA;AAGF,EAAM,MAAA,YAAA,GAAe,YAAY,YAC7B,GAAA,QAAA,CAAS,QAAQ,WAAY,CAAA,YAAY,CAAE,CAAA,UAAA,EAC3C,GAAA,KAAA,CAAA;AAEJ,EAAA,MAAM,4BACH,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,WAAU,MACnB,EAAA,EAAA,QAAA,EAAS,UAAI,YAChB,CAAA;AAGF,EAAA,MAAM,MACJ,mBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAa,YAAY,SAAW,EAAA,WAAA;AAAA,MACpC,OAAA,EAAS,YAAY,SAAW,EAAA,QAAA;AAAA,MAChC,SAAS,EAAE,MAAA,EAAQ,QAAQ,MAAQ,EAAA,UAAA,EAAY,QAAQ,UAAW;AAAA;AAAA,GACpE;AAGF,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,OAAS,EAAA,EAAE,IAAM,EAAA,OAAA,CAAQ,IAAK,EAAA;AAAA,MAC9B,wBAAsB,WAAY,CAAA;AAAA,KAAA;AAAA,oBAElC,KAAA,CAAA,aAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,MAAA;AAAA,QACA,KAAA;AAAA,QACA,SAAA;AAAA,QACA,MACE,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAiB,EAAA,EAAA,eAAA,EAAiB,YAAY,eAAiB,EAAA,CAAA;AAAA,QAElE,OAAS,EAAA;AAAA,UACP,GAAI,UAAA,IAAc,EAAE,IAAA,EAAM,QAAQ,oBAAqB,EAAA;AAAA,UACvD,QAAQ,OAAQ,CAAA;AAAA;AAClB;AAAA,KACF;AAAA,IAEC,CAAC,8BACC,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,EAAY,WAAW,OAAQ,CAAA,OAAA,EAAA,EAC7B,YAAY,QACX,oBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,uBAAA;AAAA,MAAA;AAAA,QACC,UAAU,WAAY,CAAA,QAAA;AAAA,QACtB,WAAW,OAAQ,CAAA;AAAA;AAAA,KACrB,EAGD,YAAY,SACX,oBAAA,KAAA,CAAA,aAAA,CAAC,4BAAyB,SAAW,EAAA,WAAA,CAAY,WAAW,CAEhE;AAAA,GAEJ;AAEJ;;;;"}
|
package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestCardPolicies.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Policy } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestCardPolicy } from './PullRequestCardPolicy';\nimport React from 'react';\n\ntype PullRequestCardProps = {\n policies: Policy[];\n className: string;\n};\n\nexport const PullRequestCardPolicies = ({\n policies,\n className,\n}: PullRequestCardProps) => (\n <div className={className}>\n {policies.map(policy => (\n <PullRequestCardPolicy key={policy.id} policy={policy} />\n ))}\n </div>\n);\n"],"names":[],"mappings":";;;AAyBO,MAAM,0BAA0B,CAAC;AAAA,EACtC,QAAA;AAAA,EACA
|
|
1
|
+
{"version":3,"file":"PullRequestCardPolicies.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Policy } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestCardPolicy } from './PullRequestCardPolicy';\nimport React from 'react';\n\ntype PullRequestCardProps = {\n policies: Policy[];\n className: string;\n};\n\nexport const PullRequestCardPolicies = ({\n policies,\n className,\n}: PullRequestCardProps) => (\n <div className={className}>\n {policies.map(policy => (\n <PullRequestCardPolicy key={policy.id} policy={policy} />\n ))}\n </div>\n);\n"],"names":[],"mappings":";;;AAyBO,MAAM,0BAA0B,CAAC;AAAA,EACtC,QAAA;AAAA,EACA;AACF,CAAA,qBACG,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SACF,EAAA,EAAA,QAAA,CAAS,GAAI,CAAA,CAAA,MAAA,qBACX,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,EAAsB,GAAK,EAAA,MAAA,CAAO,EAAI,EAAA,MAAA,EAAgB,CACxD,CACH;;;;"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { PolicyType, PolicyEvaluationStatus } from '@backstage-community/plugin-azure-devops-common';
|
|
2
|
-
import { styled } from '@
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import GroupWorkIcon from '@mui/icons-material/GroupWork';
|
|
2
|
+
import { withStyles, styled } from '@material-ui/core/styles';
|
|
3
|
+
import Typography from '@material-ui/core/Typography';
|
|
4
|
+
import CancelIcon from '@material-ui/icons/Cancel';
|
|
5
|
+
import GroupWorkIcon from '@material-ui/icons/GroupWork';
|
|
7
6
|
import React from 'react';
|
|
8
|
-
import WatchLaterIcon from '@
|
|
7
|
+
import WatchLaterIcon from '@material-ui/icons/WatchLater';
|
|
9
8
|
|
|
10
9
|
const PolicyRequiredIcon = withStyles(
|
|
11
10
|
(theme) => ({
|
package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestCardPolicy.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Policy,\n PolicyEvaluationStatus,\n PolicyType,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { styled } from '@
|
|
1
|
+
{"version":3,"file":"PullRequestCardPolicy.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Policy,\n PolicyEvaluationStatus,\n PolicyType,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { styled, withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport CancelIcon from '@material-ui/icons/Cancel';\nimport GroupWorkIcon from '@material-ui/icons/GroupWork';\nimport React from 'react';\nimport WatchLaterIcon from '@material-ui/icons/WatchLater';\n\nconst PolicyRequiredIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.info.main,\n },\n }),\n { name: 'PolicyRequiredIcon' },\n)(WatchLaterIcon);\n\nconst PolicyIssueIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.error.main,\n },\n }),\n { name: 'PolicyIssueIcon' },\n)(CancelIcon);\n\nconst PolicyInProgressIcon = withStyles(\n theme => ({\n root: {\n color: theme.palette.info.main,\n },\n }),\n { name: 'PolicyInProgressIcon' },\n)(GroupWorkIcon);\n\nfunction getPolicyIcon(policy: Policy): React.JSX.Element | null {\n switch (policy.type) {\n case PolicyType.Build:\n switch (policy.status) {\n case PolicyEvaluationStatus.Running:\n return <PolicyInProgressIcon />;\n case PolicyEvaluationStatus.Rejected:\n return <PolicyIssueIcon />;\n case PolicyEvaluationStatus.Queued:\n return <PolicyRequiredIcon />;\n default:\n return null;\n }\n case PolicyType.MinimumReviewers:\n case PolicyType.RequiredReviewers:\n return <PolicyRequiredIcon />;\n case PolicyType.Status:\n case PolicyType.Comments:\n return <PolicyIssueIcon />;\n default:\n return null;\n }\n}\n\nconst PullRequestCardPolicyContainer = styled('div')({\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n});\n\ntype PullRequestCardPolicyProps = {\n policy: Policy;\n};\n\nexport const PullRequestCardPolicy = ({\n policy,\n}: PullRequestCardPolicyProps) => (\n <PullRequestCardPolicyContainer>\n {getPolicyIcon(policy)}{' '}\n <Typography component=\"span\">{policy.text}</Typography>\n </PullRequestCardPolicyContainer>\n);\n"],"names":[],"mappings":";;;;;;;;AA6BA,MAAM,kBAAqB,GAAA,UAAA;AAAA,EACzB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA;AAAA;AAC5B,GACF,CAAA;AAAA,EACA,EAAE,MAAM,oBAAqB;AAC/B,CAAA,CAAE,cAAc,CAAA;AAEhB,MAAM,eAAkB,GAAA,UAAA;AAAA,EACtB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,KAAM,CAAA;AAAA;AAC7B,GACF,CAAA;AAAA,EACA,EAAE,MAAM,iBAAkB;AAC5B,CAAA,CAAE,UAAU,CAAA;AAEZ,MAAM,oBAAuB,GAAA,UAAA;AAAA,EAC3B,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA;AAAA;AAC5B,GACF,CAAA;AAAA,EACA,EAAE,MAAM,sBAAuB;AACjC,CAAA,CAAE,aAAa,CAAA;AAEf,SAAS,cAAc,MAA0C,EAAA;AAC/D,EAAA,QAAQ,OAAO,IAAM;AAAA,IACnB,KAAK,UAAW,CAAA,KAAA;AACd,MAAA,QAAQ,OAAO,MAAQ;AAAA,QACrB,KAAK,sBAAuB,CAAA,OAAA;AAC1B,UAAA,2CAAQ,oBAAqB,EAAA,IAAA,CAAA;AAAA,QAC/B,KAAK,sBAAuB,CAAA,QAAA;AAC1B,UAAA,2CAAQ,eAAgB,EAAA,IAAA,CAAA;AAAA,QAC1B,KAAK,sBAAuB,CAAA,MAAA;AAC1B,UAAA,2CAAQ,kBAAmB,EAAA,IAAA,CAAA;AAAA,QAC7B;AACE,UAAO,OAAA,IAAA;AAAA;AACX,IACF,KAAK,UAAW,CAAA,gBAAA;AAAA,IAChB,KAAK,UAAW,CAAA,iBAAA;AACd,MAAA,2CAAQ,kBAAmB,EAAA,IAAA,CAAA;AAAA,IAC7B,KAAK,UAAW,CAAA,MAAA;AAAA,IAChB,KAAK,UAAW,CAAA,QAAA;AACd,MAAA,2CAAQ,eAAgB,EAAA,IAAA,CAAA;AAAA,IAC1B;AACE,MAAO,OAAA,IAAA;AAAA;AAEb;AAEA,MAAM,8BAAA,GAAiC,MAAO,CAAA,KAAK,CAAE,CAAA;AAAA,EACnD,OAAS,EAAA,MAAA;AAAA,EACT,UAAY,EAAA,QAAA;AAAA,EACZ,QAAU,EAAA;AACZ,CAAC,CAAA;AAMM,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,CAAA,qBACG,KAAA,CAAA,aAAA,CAAA,8BAAA,EAAA,IAAA,EACE,aAAc,CAAA,MAAM,CAAG,EAAA,GAAA,kBACvB,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,SAAU,EAAA,MAAA,EAAA,EAAQ,MAAO,CAAA,IAAK,CAC5C;;;;"}
|
package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestCardReviewer.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Avatar } from '@backstage/core-components';\nimport React from 'react';\nimport { Reviewer } from '@backstage-community/plugin-azure-devops-common';\nimport makeStyles from '@
|
|
1
|
+
{"version":3,"file":"PullRequestCardReviewer.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Avatar } from '@backstage/core-components';\nimport React from 'react';\nimport { Reviewer } from '@backstage-community/plugin-azure-devops-common';\nimport { makeStyles } from '@material-ui/core/styles';\n\ntype PullRequestCardReviewerProps = {\n reviewer: Reviewer;\n};\n\nconst useStyles = makeStyles(\n {\n avatar: {\n width: '2.5rem',\n height: '2.5rem',\n border: '0.3rem solid silver',\n },\n avatarText: {\n fontSize: '1rem',\n },\n },\n { name: 'PullRequestCardReviewer' },\n);\n\nexport const PullRequestCardReviewer = ({\n reviewer,\n}: PullRequestCardReviewerProps) => {\n const classes = useStyles();\n\n return (\n <Avatar\n displayName={reviewer.displayName}\n picture={reviewer.imageUrl}\n classes={classes}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAyBA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,MAAQ,EAAA;AAAA,MACN,KAAO,EAAA,QAAA;AAAA,MACP,MAAQ,EAAA,QAAA;AAAA,MACR,MAAQ,EAAA;AAAA,KACV;AAAA,IACA,UAAY,EAAA;AAAA,MACV,QAAU,EAAA;AAAA;AACZ,GACF;AAAA,EACA,EAAE,MAAM,yBAA0B;AACpC,CAAA;AAEO,MAAM,0BAA0B,CAAC;AAAA,EACtC;AACF,CAAoC,KAAA;AAClC,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,aAAa,QAAS,CAAA,WAAA;AAAA,MACtB,SAAS,QAAS,CAAA,QAAA;AAAA,MAClB;AAAA;AAAA,GACF;AAEJ;;;;"}
|
package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PullRequestCardReviewer } from './PullRequestCardReviewer.esm.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { reviewerFilter } from '../utils.esm.js';
|
|
4
|
-
import { styled } from '@
|
|
4
|
+
import { styled } from '@material-ui/core/styles';
|
|
5
5
|
|
|
6
6
|
const PullRequestCardReviewersContainer = styled("div")({
|
|
7
7
|
"& > *": {
|
package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestCardReviewers.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PullRequestCardReviewer } from './PullRequestCardReviewer';\nimport React from 'react';\nimport { Reviewer } from '@backstage-community/plugin-azure-devops-common';\nimport { reviewerFilter } from '../utils';\nimport { styled } from '@
|
|
1
|
+
{"version":3,"file":"PullRequestCardReviewers.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PullRequestCardReviewer } from './PullRequestCardReviewer';\nimport React from 'react';\nimport { Reviewer } from '@backstage-community/plugin-azure-devops-common';\nimport { reviewerFilter } from '../utils';\nimport { styled } from '@material-ui/core/styles';\n\nconst PullRequestCardReviewersContainer = styled('div')({\n '& > *': {\n marginTop: 4,\n marginBottom: 4,\n },\n});\n\ntype PullRequestCardReviewersProps = {\n reviewers: Reviewer[];\n};\n\nexport const PullRequestCardReviewers = ({\n reviewers,\n}: PullRequestCardReviewersProps) => (\n <PullRequestCardReviewersContainer>\n {reviewers.filter(reviewerFilter).map(reviewer => (\n <PullRequestCardReviewer key={reviewer.id} reviewer={reviewer} />\n ))}\n </PullRequestCardReviewersContainer>\n);\n"],"names":[],"mappings":";;;;;AAsBA,MAAM,iCAAA,GAAoC,MAAO,CAAA,KAAK,CAAE,CAAA;AAAA,EACtD,OAAS,EAAA;AAAA,IACP,SAAW,EAAA,CAAA;AAAA,IACX,YAAc,EAAA;AAAA;AAElB,CAAC,CAAA;AAMM,MAAM,2BAA2B,CAAC;AAAA,EACvC;AACF,CAAA,qBACG,KAAA,CAAA,aAAA,CAAA,iCAAA,EAAA,IAAA,EACE,SAAU,CAAA,MAAA,CAAO,cAAc,CAAE,CAAA,GAAA,CAAI,CACpC,QAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,2BAAwB,GAAK,EAAA,QAAA,CAAS,EAAI,EAAA,QAAA,EAAoB,CAChE,CACH;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PullRequestGridColumn } from '../PullRequestGridColumn/PullRequestGridColumn.esm.js';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { styled } from '@
|
|
3
|
+
import { styled } from '@material-ui/core/styles';
|
|
4
4
|
|
|
5
5
|
const GridDiv = styled("div")(({ theme }) => ({
|
|
6
6
|
display: "flex",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestGrid.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PullRequestGridColumn } from '../PullRequestGridColumn';\nimport { PullRequestGroup } from '../types';\nimport React from 'react';\nimport { styled } from '@
|
|
1
|
+
{"version":3,"file":"PullRequestGrid.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PullRequestGridColumn } from '../PullRequestGridColumn';\nimport { PullRequestGroup } from '../types';\nimport React from 'react';\nimport { styled } from '@material-ui/core/styles';\n\nconst GridDiv = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n '& > *': {\n marginRight: theme.spacing(2),\n },\n '& > :last-of-type': {\n marginRight: 0,\n },\n}));\n\ntype PullRequestGridProps = {\n pullRequestGroups: PullRequestGroup[];\n};\n\nexport const PullRequestGrid = ({\n pullRequestGroups,\n}: PullRequestGridProps) => {\n return (\n <GridDiv>\n {pullRequestGroups.map((pullRequestGroup, index) => (\n <PullRequestGridColumn\n key={index}\n pullRequestGroup={pullRequestGroup}\n />\n ))}\n </GridDiv>\n );\n};\n"],"names":[],"mappings":";;;;AAqBA,MAAM,UAAU,MAAO,CAAA,KAAK,EAAE,CAAC,EAAE,OAAa,MAAA;AAAA,EAC5C,OAAS,EAAA,MAAA;AAAA,EACT,aAAe,EAAA,KAAA;AAAA,EACf,cAAgB,EAAA,eAAA;AAAA,EAChB,OAAS,EAAA;AAAA,IACP,WAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA,GAC9B;AAAA,EACA,mBAAqB,EAAA;AAAA,IACnB,WAAa,EAAA;AAAA;AAEjB,CAAE,CAAA,CAAA;AAMK,MAAM,kBAAkB,CAAC;AAAA,EAC9B;AACF,CAA4B,KAAA;AAC1B,EAAA,2CACG,OACE,EAAA,IAAA,EAAA,iBAAA,CAAkB,GAAI,CAAA,CAAC,kBAAkB,KACxC,qBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,qBAAA;AAAA,IAAA;AAAA,MACC,GAAK,EAAA,KAAA;AAAA,MACL;AAAA;AAAA,GAEH,CACH,CAAA;AAEJ;;;;"}
|
package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import Paper from '@
|
|
2
|
-
import Typography from '@
|
|
3
|
-
import { styled } from '@
|
|
4
|
-
import withStyles from '@mui/styles/withStyles';
|
|
1
|
+
import Paper from '@material-ui/core/Paper';
|
|
2
|
+
import Typography from '@material-ui/core/Typography';
|
|
3
|
+
import { withStyles, styled } from '@material-ui/core/styles';
|
|
5
4
|
import { PullRequestCard } from '../PullRequestCard/PullRequestCard.esm.js';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
|
|
@@ -11,7 +10,7 @@ const ColumnPaper = withStyles((theme) => ({
|
|
|
11
10
|
flexDirection: "column",
|
|
12
11
|
flex: 1,
|
|
13
12
|
padding: theme.spacing(2),
|
|
14
|
-
backgroundColor: theme.palette.
|
|
13
|
+
backgroundColor: theme.palette.type === "dark" ? theme.palette.grey[800] : theme.palette.grey[300],
|
|
15
14
|
height: "100%"
|
|
16
15
|
}
|
|
17
16
|
}))(Paper);
|
package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PullRequestGridColumn.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Paper from '@
|
|
1
|
+
{"version":3,"file":"PullRequestGridColumn.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Paper from '@material-ui/core/Paper';\nimport Typography from '@material-ui/core/Typography';\nimport { styled, withStyles } from '@material-ui/core/styles';\n\nimport { PullRequestCard } from '../PullRequestCard';\nimport { PullRequestGroup } from '../types';\nimport React from 'react';\n\nconst ColumnPaper = withStyles(theme => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n flex: 1,\n padding: theme.spacing(2),\n backgroundColor:\n theme.palette.type === 'dark'\n ? theme.palette.grey[800]\n : theme.palette.grey[300],\n height: '100%',\n },\n}))(Paper);\n\nconst ColumnTitleDiv = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n marginBottom: theme.spacing(2),\n}));\n\nexport const PullRequestCardContainer = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n '& > *': {\n marginBottom: theme.spacing(2),\n },\n '& > :last-of-type': {\n marginBottom: 0,\n },\n}));\n\ntype PullRequestGridColumnProps = {\n pullRequestGroup: PullRequestGroup;\n};\n\nexport const PullRequestGridColumn = ({\n pullRequestGroup,\n}: PullRequestGridColumnProps) => {\n const columnTitle = (\n <ColumnTitleDiv>\n <Typography variant=\"h5\">{pullRequestGroup.title}</Typography>\n </ColumnTitleDiv>\n );\n\n const pullRequests = (\n <PullRequestCardContainer>\n {pullRequestGroup.pullRequests.map(pullRequest => (\n <PullRequestCard\n key={pullRequest.pullRequestId}\n pullRequest={pullRequest}\n simplified={pullRequestGroup.simplified}\n />\n ))}\n </PullRequestCardContainer>\n );\n\n return (\n <ColumnPaper>\n {columnTitle}\n {pullRequests}\n </ColumnPaper>\n );\n};\n"],"names":[],"mappings":";;;;;;AAwBA,MAAM,WAAA,GAAc,WAAW,CAAU,KAAA,MAAA;AAAA,EACvC,IAAM,EAAA;AAAA,IACJ,OAAS,EAAA,MAAA;AAAA,IACT,aAAe,EAAA,QAAA;AAAA,IACf,IAAM,EAAA,CAAA;AAAA,IACN,OAAA,EAAS,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IACxB,eACE,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,MACnB,GAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAA,GACtB,KAAM,CAAA,OAAA,CAAQ,KAAK,GAAG,CAAA;AAAA,IAC5B,MAAQ,EAAA;AAAA;AAEZ,CAAA,CAAE,EAAE,KAAK,CAAA;AAET,MAAM,iBAAiB,MAAO,CAAA,KAAK,EAAE,CAAC,EAAE,OAAa,MAAA;AAAA,EACnD,OAAS,EAAA,MAAA;AAAA,EACT,aAAe,EAAA,KAAA;AAAA,EACf,UAAY,EAAA,QAAA;AAAA,EACZ,cAAgB,EAAA,eAAA;AAAA,EAChB,YAAA,EAAc,KAAM,CAAA,OAAA,CAAQ,CAAC;AAC/B,CAAE,CAAA,CAAA;AAEK,MAAM,2BAA2B,MAAO,CAAA,KAAK,EAAE,CAAC,EAAE,OAAa,MAAA;AAAA,EACpE,OAAS,EAAA,MAAA;AAAA,EACT,aAAe,EAAA,QAAA;AAAA,EACf,OAAS,EAAA;AAAA,IACP,YAAA,EAAc,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA,GAC/B;AAAA,EACA,mBAAqB,EAAA;AAAA,IACnB,YAAc,EAAA;AAAA;AAElB,CAAE,CAAA;AAMK,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,CAAkC,KAAA;AAChC,EAAM,MAAA,WAAA,uCACH,cACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAW,OAAQ,EAAA,IAAA,EAAA,EAAM,gBAAiB,CAAA,KAAM,CACnD,CAAA;AAGF,EAAA,MAAM,+BACH,KAAA,CAAA,aAAA,CAAA,wBAAA,EAAA,IAAA,EACE,gBAAiB,CAAA,YAAA,CAAa,IAAI,CACjC,WAAA,qBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,KAAK,WAAY,CAAA,aAAA;AAAA,MACjB,WAAA;AAAA,MACA,YAAY,gBAAiB,CAAA;AAAA;AAAA,GAEhC,CACH,CAAA;AAGF,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,WACE,EAAA,IAAA,EAAA,WAAA,EACA,YACH,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/allFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\n\n/** @public */\nexport type AllFilter = BaseFilter & {\n type: FilterType.All;\n};\n\nexport function createAllFilter(): PullRequestFilter {\n return (_pullRequest: DashboardPullRequest): boolean => true;\n}\n"],"names":[],"mappings":"AAyBO,SAAS,eAAqC,GAAA;AACnD,EAAA,OAAO,CAAC,YAAgD,KAAA,IAAA
|
|
1
|
+
{"version":3,"file":"allFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/allFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\n\n/** @public */\nexport type AllFilter = BaseFilter & {\n type: FilterType.All;\n};\n\nexport function createAllFilter(): PullRequestFilter {\n return (_pullRequest: DashboardPullRequest): boolean => true;\n}\n"],"names":[],"mappings":"AAyBO,SAAS,eAAqC,GAAA;AACnD,EAAA,OAAO,CAAC,YAAgD,KAAA,IAAA;AAC1D;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assignedToTeamFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { stringArrayHas } from '../../../../utils';\n\n/** @public */\nexport type AssignedToTeamFilter = BaseFilter & {\n type: FilterType.AssignedToTeam;\n teamId: string;\n};\n\nexport function createAssignedToTeamFilter(\n filter: AssignedToTeamFilter,\n): PullRequestFilter {\n return (pullRequest: DashboardPullRequest): boolean => {\n const reviewerIds = pullRequest.reviewers?.map(reviewer => reviewer.id);\n\n if (!reviewerIds) {\n return false;\n }\n\n return stringArrayHas(reviewerIds, filter.teamId, true);\n };\n}\n"],"names":[],"mappings":";;;;;AA0BO,SAAS,2BACd,MACmB,EAAA;AACnB,EAAA,OAAO,CAAC,WAA+C,KAAA;AACrD,IAAA,MAAM,cAAc,WAAY,CAAA,SAAA,EAAW,GAAI,CAAA,CAAA,QAAA,KAAY,SAAS,EAAE,CAAA
|
|
1
|
+
{"version":3,"file":"assignedToTeamFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { stringArrayHas } from '../../../../utils';\n\n/** @public */\nexport type AssignedToTeamFilter = BaseFilter & {\n type: FilterType.AssignedToTeam;\n teamId: string;\n};\n\nexport function createAssignedToTeamFilter(\n filter: AssignedToTeamFilter,\n): PullRequestFilter {\n return (pullRequest: DashboardPullRequest): boolean => {\n const reviewerIds = pullRequest.reviewers?.map(reviewer => reviewer.id);\n\n if (!reviewerIds) {\n return false;\n }\n\n return stringArrayHas(reviewerIds, filter.teamId, true);\n };\n}\n"],"names":[],"mappings":";;;;;AA0BO,SAAS,2BACd,MACmB,EAAA;AACnB,EAAA,OAAO,CAAC,WAA+C,KAAA;AACrD,IAAA,MAAM,cAAc,WAAY,CAAA,SAAA,EAAW,GAAI,CAAA,CAAA,QAAA,KAAY,SAAS,EAAE,CAAA;AAEtE,IAAA,IAAI,CAAC,WAAa,EAAA;AAChB,MAAO,OAAA,KAAA;AAAA;AAGT,IAAA,OAAO,cAAe,CAAA,WAAA,EAAa,MAAO,CAAA,MAAA,EAAQ,IAAI,CAAA;AAAA,GACxD;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assignedToTeamsFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { createAssignedToTeamFilter } from './assignedToTeamFilter';\n\n/** @public */\nexport type AssignedToTeamsFilter = BaseFilter &\n (\n | {\n type: FilterType.AssignedToTeams;\n teamIds: string[];\n }\n | {\n type: FilterType.AssignedToCurrentUsersTeams;\n teamIds?: string[];\n }\n );\n\nexport function createAssignedToTeamsFilter(\n filter: AssignedToTeamsFilter,\n): PullRequestFilter {\n const teamIds = filter.teamIds;\n\n return (pullRequest: DashboardPullRequest): boolean => {\n if (!teamIds) {\n return false;\n }\n\n return teamIds.some(teamId => {\n return createAssignedToTeamFilter({\n type: FilterType.AssignedToTeam,\n teamId,\n })(pullRequest);\n });\n };\n}\n"],"names":[],"mappings":";;;AAiCO,SAAS,4BACd,MACmB,EAAA;AACnB,EAAA,MAAM,UAAU,MAAO,CAAA,OAAA
|
|
1
|
+
{"version":3,"file":"assignedToTeamsFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { createAssignedToTeamFilter } from './assignedToTeamFilter';\n\n/** @public */\nexport type AssignedToTeamsFilter = BaseFilter &\n (\n | {\n type: FilterType.AssignedToTeams;\n teamIds: string[];\n }\n | {\n type: FilterType.AssignedToCurrentUsersTeams;\n teamIds?: string[];\n }\n );\n\nexport function createAssignedToTeamsFilter(\n filter: AssignedToTeamsFilter,\n): PullRequestFilter {\n const teamIds = filter.teamIds;\n\n return (pullRequest: DashboardPullRequest): boolean => {\n if (!teamIds) {\n return false;\n }\n\n return teamIds.some(teamId => {\n return createAssignedToTeamFilter({\n type: FilterType.AssignedToTeam,\n teamId,\n })(pullRequest);\n });\n };\n}\n"],"names":[],"mappings":";;;AAiCO,SAAS,4BACd,MACmB,EAAA;AACnB,EAAA,MAAM,UAAU,MAAO,CAAA,OAAA;AAEvB,EAAA,OAAO,CAAC,WAA+C,KAAA;AACrD,IAAA,IAAI,CAAC,OAAS,EAAA;AACZ,MAAO,OAAA,KAAA;AAAA;AAGT,IAAO,OAAA,OAAA,CAAQ,KAAK,CAAU,MAAA,KAAA;AAC5B,MAAA,OAAO,0BAA2B,CAAA;AAAA,QAChC,MAAM,UAAW,CAAA,cAAA;AAAA,QACjB;AAAA,OACD,EAAE,WAAW,CAAA;AAAA,KACf,CAAA;AAAA,GACH;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assignedToUserFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { stringArrayHas } from '../../../../utils';\n\n/** @public */\nexport type AssignedToUserFilter = BaseFilter &\n (\n | {\n type: FilterType.AssignedToUser;\n email: string;\n }\n | {\n type: FilterType.AssignedToCurrentUser;\n email?: string;\n }\n );\n\nexport function createAssignedToUserFilter(\n filter: AssignedToUserFilter,\n): PullRequestFilter {\n const email = filter.email;\n\n return (pullRequest: DashboardPullRequest): boolean => {\n const uniqueNames = pullRequest.reviewers?.map(\n reviewer => reviewer.uniqueName,\n );\n\n if (!email || !uniqueNames) {\n return false;\n }\n\n return stringArrayHas(uniqueNames, email, true);\n };\n}\n"],"names":[],"mappings":";;;;;AAiCO,SAAS,2BACd,MACmB,EAAA;AACnB,EAAA,MAAM,QAAQ,MAAO,CAAA,KAAA
|
|
1
|
+
{"version":3,"file":"assignedToUserFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { stringArrayHas } from '../../../../utils';\n\n/** @public */\nexport type AssignedToUserFilter = BaseFilter &\n (\n | {\n type: FilterType.AssignedToUser;\n email: string;\n }\n | {\n type: FilterType.AssignedToCurrentUser;\n email?: string;\n }\n );\n\nexport function createAssignedToUserFilter(\n filter: AssignedToUserFilter,\n): PullRequestFilter {\n const email = filter.email;\n\n return (pullRequest: DashboardPullRequest): boolean => {\n const uniqueNames = pullRequest.reviewers?.map(\n reviewer => reviewer.uniqueName,\n );\n\n if (!email || !uniqueNames) {\n return false;\n }\n\n return stringArrayHas(uniqueNames, email, true);\n };\n}\n"],"names":[],"mappings":";;;;;AAiCO,SAAS,2BACd,MACmB,EAAA;AACnB,EAAA,MAAM,QAAQ,MAAO,CAAA,KAAA;AAErB,EAAA,OAAO,CAAC,WAA+C,KAAA;AACrD,IAAM,MAAA,WAAA,GAAc,YAAY,SAAW,EAAA,GAAA;AAAA,MACzC,cAAY,QAAS,CAAA;AAAA,KACvB;AAEA,IAAI,IAAA,CAAC,KAAS,IAAA,CAAC,WAAa,EAAA;AAC1B,MAAO,OAAA,KAAA;AAAA;AAGT,IAAO,OAAA,cAAA,CAAe,WAAa,EAAA,KAAA,EAAO,IAAI,CAAA;AAAA,GAChD;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/createFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Filter, FilterType, PullRequestFilter } from './types';\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { createAllFilter } from './allFilter';\nimport { createAssignedToTeamFilter } from './assignedToTeamFilter';\nimport { createAssignedToTeamsFilter } from './assignedToTeamsFilter';\nimport { createAssignedToUserFilter } from './assignedToUserFilter';\nimport { createCreatedByTeamFilter } from './createdByTeamFilter';\nimport { createCreatedByTeamsFilter } from './createdByTeamsFilter';\nimport { createCreatedByUserFilter } from './createdByUserFilter';\n\nexport function createFilter(filters: Filter | Filter[]): PullRequestFilter {\n const mapFilter = (filter: Filter): PullRequestFilter => {\n switch (filter.type) {\n case FilterType.AssignedToUser:\n case FilterType.AssignedToCurrentUser:\n return createAssignedToUserFilter(filter);\n\n case FilterType.CreatedByUser:\n case FilterType.CreatedByCurrentUser:\n return createCreatedByUserFilter(filter);\n\n case FilterType.AssignedToTeam:\n return createAssignedToTeamFilter(filter);\n\n case FilterType.CreatedByTeam:\n return createCreatedByTeamFilter(filter);\n\n case FilterType.AssignedToTeams:\n case FilterType.AssignedToCurrentUsersTeams:\n return createAssignedToTeamsFilter(filter);\n\n case FilterType.CreatedByTeams:\n case FilterType.CreatedByCurrentUsersTeams:\n return createCreatedByTeamsFilter(filter);\n\n case FilterType.All:\n return createAllFilter();\n\n default:\n return _ => false;\n }\n };\n\n if (Array.isArray(filters)) {\n if (filters.length === 1) {\n return mapFilter(filters[0]);\n }\n\n return (pullRequest: DashboardPullRequest): boolean =>\n filters.every(filter => mapFilter(filter)(pullRequest));\n }\n\n return mapFilter(filters);\n}\n"],"names":[],"mappings":";;;;;;;;;AA2BO,SAAS,aAAa,OAA+C,EAAA;AAC1E,EAAM,MAAA,SAAA,GAAY,CAAC,MAAsC,KAAA;AACvD,IAAA,QAAQ,OAAO,IAAM;AAAA,MACnB,KAAK,UAAW,CAAA,cAAA
|
|
1
|
+
{"version":3,"file":"createFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/createFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Filter, FilterType, PullRequestFilter } from './types';\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { createAllFilter } from './allFilter';\nimport { createAssignedToTeamFilter } from './assignedToTeamFilter';\nimport { createAssignedToTeamsFilter } from './assignedToTeamsFilter';\nimport { createAssignedToUserFilter } from './assignedToUserFilter';\nimport { createCreatedByTeamFilter } from './createdByTeamFilter';\nimport { createCreatedByTeamsFilter } from './createdByTeamsFilter';\nimport { createCreatedByUserFilter } from './createdByUserFilter';\n\nexport function createFilter(filters: Filter | Filter[]): PullRequestFilter {\n const mapFilter = (filter: Filter): PullRequestFilter => {\n switch (filter.type) {\n case FilterType.AssignedToUser:\n case FilterType.AssignedToCurrentUser:\n return createAssignedToUserFilter(filter);\n\n case FilterType.CreatedByUser:\n case FilterType.CreatedByCurrentUser:\n return createCreatedByUserFilter(filter);\n\n case FilterType.AssignedToTeam:\n return createAssignedToTeamFilter(filter);\n\n case FilterType.CreatedByTeam:\n return createCreatedByTeamFilter(filter);\n\n case FilterType.AssignedToTeams:\n case FilterType.AssignedToCurrentUsersTeams:\n return createAssignedToTeamsFilter(filter);\n\n case FilterType.CreatedByTeams:\n case FilterType.CreatedByCurrentUsersTeams:\n return createCreatedByTeamsFilter(filter);\n\n case FilterType.All:\n return createAllFilter();\n\n default:\n return _ => false;\n }\n };\n\n if (Array.isArray(filters)) {\n if (filters.length === 1) {\n return mapFilter(filters[0]);\n }\n\n return (pullRequest: DashboardPullRequest): boolean =>\n filters.every(filter => mapFilter(filter)(pullRequest));\n }\n\n return mapFilter(filters);\n}\n"],"names":[],"mappings":";;;;;;;;;AA2BO,SAAS,aAAa,OAA+C,EAAA;AAC1E,EAAM,MAAA,SAAA,GAAY,CAAC,MAAsC,KAAA;AACvD,IAAA,QAAQ,OAAO,IAAM;AAAA,MACnB,KAAK,UAAW,CAAA,cAAA;AAAA,MAChB,KAAK,UAAW,CAAA,qBAAA;AACd,QAAA,OAAO,2BAA2B,MAAM,CAAA;AAAA,MAE1C,KAAK,UAAW,CAAA,aAAA;AAAA,MAChB,KAAK,UAAW,CAAA,oBAAA;AACd,QAAA,OAAO,0BAA0B,MAAM,CAAA;AAAA,MAEzC,KAAK,UAAW,CAAA,cAAA;AACd,QAAA,OAAO,2BAA2B,MAAM,CAAA;AAAA,MAE1C,KAAK,UAAW,CAAA,aAAA;AACd,QAAA,OAAO,0BAA0B,MAAM,CAAA;AAAA,MAEzC,KAAK,UAAW,CAAA,eAAA;AAAA,MAChB,KAAK,UAAW,CAAA,2BAAA;AACd,QAAA,OAAO,4BAA4B,MAAM,CAAA;AAAA,MAE3C,KAAK,UAAW,CAAA,cAAA;AAAA,MAChB,KAAK,UAAW,CAAA,0BAAA;AACd,QAAA,OAAO,2BAA2B,MAAM,CAAA;AAAA,MAE1C,KAAK,UAAW,CAAA,GAAA;AACd,QAAA,OAAO,eAAgB,EAAA;AAAA,MAEzB;AACE,QAAA,OAAO,CAAK,CAAA,KAAA,KAAA;AAAA;AAChB,GACF;AAEA,EAAI,IAAA,KAAA,CAAM,OAAQ,CAAA,OAAO,CAAG,EAAA;AAC1B,IAAI,IAAA,OAAA,CAAQ,WAAW,CAAG,EAAA;AACxB,MAAO,OAAA,SAAA,CAAU,OAAQ,CAAA,CAAC,CAAC,CAAA;AAAA;AAG7B,IAAO,OAAA,CAAC,gBACN,OAAQ,CAAA,KAAA,CAAM,YAAU,SAAU,CAAA,MAAM,CAAE,CAAA,WAAW,CAAC,CAAA;AAAA;AAG1D,EAAA,OAAO,UAAU,OAAO,CAAA;AAC1B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createdByTeamFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { stringArrayHas } from '../../../../utils';\n\n/** @public */\nexport type CreatedByTeamFilter = BaseFilter &\n ({\n type: FilterType.CreatedByTeam;\n } & ({ teamId: string } | { teamName: string }));\n\nexport function createCreatedByTeamFilter(\n filter: CreatedByTeamFilter,\n): PullRequestFilter {\n return (pullRequest: DashboardPullRequest): boolean => {\n const [createdByTeams, team] =\n 'teamId' in filter\n ? [pullRequest.createdBy?.teamIds, filter.teamId]\n : [pullRequest.createdBy?.teamNames, filter.teamName];\n\n if (!createdByTeams) {\n return false;\n }\n\n return stringArrayHas(createdByTeams, team, true);\n };\n}\n"],"names":[],"mappings":";;;;;AA0BO,SAAS,0BACd,MACmB,EAAA;AACnB,EAAA,OAAO,CAAC,WAA+C,KAAA;AACrD,IAAA,MAAM,CAAC,cAAgB,EAAA,IAAI,IACzB,QAAY,IAAA,MAAA,GACR,CAAC,WAAY,CAAA,SAAA,EAAW,OAAS,EAAA,MAAA,CAAO,MAAM,CAC9C,GAAA,CAAC,YAAY,SAAW,EAAA,SAAA,EAAW,OAAO,QAAQ,CAAA
|
|
1
|
+
{"version":3,"file":"createdByTeamFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { stringArrayHas } from '../../../../utils';\n\n/** @public */\nexport type CreatedByTeamFilter = BaseFilter &\n ({\n type: FilterType.CreatedByTeam;\n } & ({ teamId: string } | { teamName: string }));\n\nexport function createCreatedByTeamFilter(\n filter: CreatedByTeamFilter,\n): PullRequestFilter {\n return (pullRequest: DashboardPullRequest): boolean => {\n const [createdByTeams, team] =\n 'teamId' in filter\n ? [pullRequest.createdBy?.teamIds, filter.teamId]\n : [pullRequest.createdBy?.teamNames, filter.teamName];\n\n if (!createdByTeams) {\n return false;\n }\n\n return stringArrayHas(createdByTeams, team, true);\n };\n}\n"],"names":[],"mappings":";;;;;AA0BO,SAAS,0BACd,MACmB,EAAA;AACnB,EAAA,OAAO,CAAC,WAA+C,KAAA;AACrD,IAAA,MAAM,CAAC,cAAgB,EAAA,IAAI,IACzB,QAAY,IAAA,MAAA,GACR,CAAC,WAAY,CAAA,SAAA,EAAW,OAAS,EAAA,MAAA,CAAO,MAAM,CAC9C,GAAA,CAAC,YAAY,SAAW,EAAA,SAAA,EAAW,OAAO,QAAQ,CAAA;AAExD,IAAA,IAAI,CAAC,cAAgB,EAAA;AACnB,MAAO,OAAA,KAAA;AAAA;AAGT,IAAO,OAAA,cAAA,CAAe,cAAgB,EAAA,IAAA,EAAM,IAAI,CAAA;AAAA,GAClD;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createdByTeamsFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { createCreatedByTeamFilter } from './createdByTeamFilter';\n\n/** @public */\nexport type CreatedByTeamsFilter = BaseFilter &\n (\n | ({\n type: FilterType.CreatedByTeams;\n } & ({ teamIds: string[] } | { teamNames: string[] }))\n | {\n type: FilterType.CreatedByCurrentUsersTeams;\n teamIds?: string[];\n }\n );\n\nexport function createCreatedByTeamsFilter(\n filter: CreatedByTeamsFilter,\n): PullRequestFilter {\n return (pullRequest: DashboardPullRequest): boolean => {\n if ('teamNames' in filter) {\n const teamNames = filter.teamNames;\n\n if (!teamNames) {\n return false;\n }\n\n return teamNames.some(teamName => {\n return createCreatedByTeamFilter({\n type: FilterType.CreatedByTeam,\n teamName,\n })(pullRequest);\n });\n }\n\n const teamIds = filter.teamIds;\n\n if (!teamIds) {\n return false;\n }\n\n return teamIds.some(teamId => {\n return createCreatedByTeamFilter({\n type: FilterType.CreatedByTeam,\n teamId,\n })(pullRequest);\n });\n };\n}\n"],"names":[],"mappings":";;;AAgCO,SAAS,2BACd,MACmB,EAAA;AACnB,EAAA,OAAO,CAAC,WAA+C,KAAA;AACrD,IAAA,IAAI,eAAe,MAAQ,EAAA;AACzB,MAAA,MAAM,YAAY,MAAO,CAAA,SAAA
|
|
1
|
+
{"version":3,"file":"createdByTeamsFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { createCreatedByTeamFilter } from './createdByTeamFilter';\n\n/** @public */\nexport type CreatedByTeamsFilter = BaseFilter &\n (\n | ({\n type: FilterType.CreatedByTeams;\n } & ({ teamIds: string[] } | { teamNames: string[] }))\n | {\n type: FilterType.CreatedByCurrentUsersTeams;\n teamIds?: string[];\n }\n );\n\nexport function createCreatedByTeamsFilter(\n filter: CreatedByTeamsFilter,\n): PullRequestFilter {\n return (pullRequest: DashboardPullRequest): boolean => {\n if ('teamNames' in filter) {\n const teamNames = filter.teamNames;\n\n if (!teamNames) {\n return false;\n }\n\n return teamNames.some(teamName => {\n return createCreatedByTeamFilter({\n type: FilterType.CreatedByTeam,\n teamName,\n })(pullRequest);\n });\n }\n\n const teamIds = filter.teamIds;\n\n if (!teamIds) {\n return false;\n }\n\n return teamIds.some(teamId => {\n return createCreatedByTeamFilter({\n type: FilterType.CreatedByTeam,\n teamId,\n })(pullRequest);\n });\n };\n}\n"],"names":[],"mappings":";;;AAgCO,SAAS,2BACd,MACmB,EAAA;AACnB,EAAA,OAAO,CAAC,WAA+C,KAAA;AACrD,IAAA,IAAI,eAAe,MAAQ,EAAA;AACzB,MAAA,MAAM,YAAY,MAAO,CAAA,SAAA;AAEzB,MAAA,IAAI,CAAC,SAAW,EAAA;AACd,QAAO,OAAA,KAAA;AAAA;AAGT,MAAO,OAAA,SAAA,CAAU,KAAK,CAAY,QAAA,KAAA;AAChC,QAAA,OAAO,yBAA0B,CAAA;AAAA,UAC/B,MAAM,UAAW,CAAA,aAAA;AAAA,UACjB;AAAA,SACD,EAAE,WAAW,CAAA;AAAA,OACf,CAAA;AAAA;AAGH,IAAA,MAAM,UAAU,MAAO,CAAA,OAAA;AAEvB,IAAA,IAAI,CAAC,OAAS,EAAA;AACZ,MAAO,OAAA,KAAA;AAAA;AAGT,IAAO,OAAA,OAAA,CAAQ,KAAK,CAAU,MAAA,KAAA;AAC5B,MAAA,OAAO,yBAA0B,CAAA;AAAA,QAC/B,MAAM,UAAW,CAAA,aAAA;AAAA,QACjB;AAAA,OACD,EAAE,WAAW,CAAA;AAAA,KACf,CAAA;AAAA,GACH;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createdByUserFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { equalsIgnoreCase } from '../../../../utils';\n\n/** @public */\nexport type CreatedByUserFilter = BaseFilter &\n (\n | {\n type: FilterType.CreatedByUser;\n email: string;\n }\n | {\n type: FilterType.CreatedByCurrentUser;\n email?: string;\n }\n );\n\nexport function createCreatedByUserFilter(\n filter: CreatedByUserFilter,\n): PullRequestFilter {\n const email = filter.email;\n\n return (pullRequest: DashboardPullRequest): boolean => {\n const uniqueName = pullRequest.createdBy?.uniqueName;\n\n if (!email || !uniqueName) {\n return false;\n }\n\n return equalsIgnoreCase(email, uniqueName);\n };\n}\n"],"names":[],"mappings":";;;;;AAiCO,SAAS,0BACd,MACmB,EAAA;AACnB,EAAA,MAAM,QAAQ,MAAO,CAAA,KAAA
|
|
1
|
+
{"version":3,"file":"createdByUserFilter.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { BaseFilter, FilterType, PullRequestFilter } from './types';\nimport { equalsIgnoreCase } from '../../../../utils';\n\n/** @public */\nexport type CreatedByUserFilter = BaseFilter &\n (\n | {\n type: FilterType.CreatedByUser;\n email: string;\n }\n | {\n type: FilterType.CreatedByCurrentUser;\n email?: string;\n }\n );\n\nexport function createCreatedByUserFilter(\n filter: CreatedByUserFilter,\n): PullRequestFilter {\n const email = filter.email;\n\n return (pullRequest: DashboardPullRequest): boolean => {\n const uniqueName = pullRequest.createdBy?.uniqueName;\n\n if (!email || !uniqueName) {\n return false;\n }\n\n return equalsIgnoreCase(email, uniqueName);\n };\n}\n"],"names":[],"mappings":";;;;;AAiCO,SAAS,0BACd,MACmB,EAAA;AACnB,EAAA,MAAM,QAAQ,MAAO,CAAA,KAAA;AAErB,EAAA,OAAO,CAAC,WAA+C,KAAA;AACrD,IAAM,MAAA,UAAA,GAAa,YAAY,SAAW,EAAA,UAAA;AAE1C,IAAI,IAAA,CAAC,KAAS,IAAA,CAAC,UAAY,EAAA;AACzB,MAAO,OAAA,KAAA;AAAA;AAGT,IAAO,OAAA,gBAAA,CAAiB,OAAO,UAAU,CAAA;AAAA,GAC3C;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/types.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AllFilter } from './allFilter';\nimport { AssignedToTeamFilter } from './assignedToTeamFilter';\nimport { AssignedToTeamsFilter } from './assignedToTeamsFilter';\nimport { AssignedToUserFilter } from './assignedToUserFilter';\nimport { CreatedByTeamFilter } from './createdByTeamFilter';\nimport { CreatedByTeamsFilter } from './createdByTeamsFilter';\nimport { CreatedByUserFilter } from './createdByUserFilter';\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\n\n/** @public */\nexport enum FilterType {\n All = 'All',\n\n // Assigned To\n AssignedToUser = 'AssignedToUser',\n AssignedToCurrentUser = 'AssignedToCurrentUser',\n AssignedToTeam = 'AssignedToTeam',\n AssignedToTeams = 'AssignedToTeams',\n AssignedToCurrentUsersTeams = 'AssignedToCurrentUsersTeams',\n\n // Created By\n CreatedByUser = 'CreatedByUser',\n CreatedByCurrentUser = 'CreatedByCurrentUser',\n CreatedByTeam = 'CreatedByTeam',\n CreatedByTeams = 'CreatedByTeams',\n CreatedByCurrentUsersTeams = 'CreatedByCurrentUsersTeams',\n}\n\n/** @public */\nexport const FilterTypes = [\n FilterType.All,\n\n FilterType.AssignedToUser,\n FilterType.AssignedToCurrentUser,\n FilterType.AssignedToTeam,\n FilterType.AssignedToTeams,\n FilterType.AssignedToCurrentUsersTeams,\n\n FilterType.CreatedByUser,\n FilterType.CreatedByCurrentUser,\n FilterType.CreatedByTeam,\n FilterType.CreatedByTeams,\n FilterType.CreatedByCurrentUsersTeams,\n] as const;\n\n/** @public */\nexport type BaseFilter = {\n type: FilterType;\n};\n\n/** @public */\nexport type Filter =\n | AssignedToUserFilter\n | CreatedByUserFilter\n | AssignedToTeamFilter\n | CreatedByTeamFilter\n | AssignedToTeamsFilter\n | CreatedByTeamsFilter\n | AllFilter;\n\nexport type {\n AssignedToUserFilter,\n CreatedByUserFilter,\n AssignedToTeamFilter,\n CreatedByTeamFilter,\n AssignedToTeamsFilter,\n CreatedByTeamsFilter,\n AllFilter,\n};\n\n/** @public */\nexport type PullRequestFilter = (pullRequest: DashboardPullRequest) => boolean;\n"],"names":["FilterType"],"mappings":"AA0BY,IAAA,UAAA,qBAAAA,WAAL,KAAA;AACL,EAAAA,YAAA,KAAM,CAAA,GAAA,KAAA
|
|
1
|
+
{"version":3,"file":"types.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/filters/types.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AllFilter } from './allFilter';\nimport { AssignedToTeamFilter } from './assignedToTeamFilter';\nimport { AssignedToTeamsFilter } from './assignedToTeamsFilter';\nimport { AssignedToUserFilter } from './assignedToUserFilter';\nimport { CreatedByTeamFilter } from './createdByTeamFilter';\nimport { CreatedByTeamsFilter } from './createdByTeamsFilter';\nimport { CreatedByUserFilter } from './createdByUserFilter';\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\n\n/** @public */\nexport enum FilterType {\n All = 'All',\n\n // Assigned To\n AssignedToUser = 'AssignedToUser',\n AssignedToCurrentUser = 'AssignedToCurrentUser',\n AssignedToTeam = 'AssignedToTeam',\n AssignedToTeams = 'AssignedToTeams',\n AssignedToCurrentUsersTeams = 'AssignedToCurrentUsersTeams',\n\n // Created By\n CreatedByUser = 'CreatedByUser',\n CreatedByCurrentUser = 'CreatedByCurrentUser',\n CreatedByTeam = 'CreatedByTeam',\n CreatedByTeams = 'CreatedByTeams',\n CreatedByCurrentUsersTeams = 'CreatedByCurrentUsersTeams',\n}\n\n/** @public */\nexport const FilterTypes = [\n FilterType.All,\n\n FilterType.AssignedToUser,\n FilterType.AssignedToCurrentUser,\n FilterType.AssignedToTeam,\n FilterType.AssignedToTeams,\n FilterType.AssignedToCurrentUsersTeams,\n\n FilterType.CreatedByUser,\n FilterType.CreatedByCurrentUser,\n FilterType.CreatedByTeam,\n FilterType.CreatedByTeams,\n FilterType.CreatedByCurrentUsersTeams,\n] as const;\n\n/** @public */\nexport type BaseFilter = {\n type: FilterType;\n};\n\n/** @public */\nexport type Filter =\n | AssignedToUserFilter\n | CreatedByUserFilter\n | AssignedToTeamFilter\n | CreatedByTeamFilter\n | AssignedToTeamsFilter\n | CreatedByTeamsFilter\n | AllFilter;\n\nexport type {\n AssignedToUserFilter,\n CreatedByUserFilter,\n AssignedToTeamFilter,\n CreatedByTeamFilter,\n AssignedToTeamsFilter,\n CreatedByTeamsFilter,\n AllFilter,\n};\n\n/** @public */\nexport type PullRequestFilter = (pullRequest: DashboardPullRequest) => boolean;\n"],"names":["FilterType"],"mappings":"AA0BY,IAAA,UAAA,qBAAAA,WAAL,KAAA;AACL,EAAAA,YAAA,KAAM,CAAA,GAAA,KAAA;AAGN,EAAAA,YAAA,gBAAiB,CAAA,GAAA,gBAAA;AACjB,EAAAA,YAAA,uBAAwB,CAAA,GAAA,uBAAA;AACxB,EAAAA,YAAA,gBAAiB,CAAA,GAAA,gBAAA;AACjB,EAAAA,YAAA,iBAAkB,CAAA,GAAA,iBAAA;AAClB,EAAAA,YAAA,6BAA8B,CAAA,GAAA,6BAAA;AAG9B,EAAAA,YAAA,eAAgB,CAAA,GAAA,eAAA;AAChB,EAAAA,YAAA,sBAAuB,CAAA,GAAA,sBAAA;AACvB,EAAAA,YAAA,eAAgB,CAAA,GAAA,eAAA;AAChB,EAAAA,YAAA,gBAAiB,CAAA,GAAA,gBAAA;AACjB,EAAAA,YAAA,4BAA6B,CAAA,GAAA,4BAAA;AAfnB,EAAAA,OAAAA,WAAAA;AAAA,CAAA,EAAA,UAAA,IAAA,EAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFilterProcessor.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/hooks/useFilterProcessor.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Filter, FilterType } from '../filters';\nimport { useUserEmail, useUserTeamIds } from '../../../../hooks';\n\nexport function useFilterProcessor(): (filters: Filter[]) => Filter[] {\n const userEmail = useUserEmail();\n const { teamIds } = useUserTeamIds(userEmail);\n\n return (filters: Filter[]): Filter[] => {\n for (const filter of filters) {\n switch (filter.type) {\n case FilterType.AssignedToCurrentUser:\n case FilterType.CreatedByCurrentUser:\n filter.email = userEmail;\n break;\n\n case FilterType.AssignedToCurrentUsersTeams:\n case FilterType.CreatedByCurrentUsersTeams:\n filter.teamIds = teamIds;\n break;\n\n default:\n break;\n }\n }\n\n return filters;\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAmBO,SAAS,kBAAsD,GAAA;AACpE,EAAA,MAAM,YAAY,YAAa,EAAA
|
|
1
|
+
{"version":3,"file":"useFilterProcessor.esm.js","sources":["../../../../../src/components/PullRequestsPage/lib/hooks/useFilterProcessor.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Filter, FilterType } from '../filters';\nimport { useUserEmail, useUserTeamIds } from '../../../../hooks';\n\nexport function useFilterProcessor(): (filters: Filter[]) => Filter[] {\n const userEmail = useUserEmail();\n const { teamIds } = useUserTeamIds(userEmail);\n\n return (filters: Filter[]): Filter[] => {\n for (const filter of filters) {\n switch (filter.type) {\n case FilterType.AssignedToCurrentUser:\n case FilterType.CreatedByCurrentUser:\n filter.email = userEmail;\n break;\n\n case FilterType.AssignedToCurrentUsersTeams:\n case FilterType.CreatedByCurrentUsersTeams:\n filter.teamIds = teamIds;\n break;\n\n default:\n break;\n }\n }\n\n return filters;\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAmBO,SAAS,kBAAsD,GAAA;AACpE,EAAA,MAAM,YAAY,YAAa,EAAA;AAC/B,EAAA,MAAM,EAAE,OAAA,EAAY,GAAA,cAAA,CAAe,SAAS,CAAA;AAE5C,EAAA,OAAO,CAAC,OAAgC,KAAA;AACtC,IAAA,KAAA,MAAW,UAAU,OAAS,EAAA;AAC5B,MAAA,QAAQ,OAAO,IAAM;AAAA,QACnB,KAAK,UAAW,CAAA,qBAAA;AAAA,QAChB,KAAK,UAAW,CAAA,oBAAA;AACd,UAAA,MAAA,CAAO,KAAQ,GAAA,SAAA;AACf,UAAA;AAAA,QAEF,KAAK,UAAW,CAAA,2BAAA;AAAA,QAChB,KAAK,UAAW,CAAA,0BAAA;AACd,UAAA,MAAA,CAAO,OAAU,GAAA,OAAA;AACjB,UAAA;AAGA;AACJ;AAGF,IAAO,OAAA,OAAA;AAAA,GACT;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.esm.js","sources":["../../../../src/components/PullRequestsPage/lib/utils.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n DashboardPullRequest,\n PullRequestVoteStatus,\n Reviewer,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { Filter, createFilter } from './filters';\nimport {\n PullRequestColumnConfig,\n PullRequestGroup,\n PullRequestGroupConfig,\n} from './types';\n\n/**\n * Filters a reviewer based on vote status and if the reviewer is required.\n * @param reviewer - a reviewer to filter.\n * @returns whether or not to filter the `reviewer`.\n */\nexport function reviewerFilter(reviewer: Reviewer): boolean {\n return reviewer.voteStatus === PullRequestVoteStatus.NoVote\n ? !!reviewer.isRequired\n : !reviewer.isContainer;\n}\n\n/**\n * Removes values from the provided array and returns them.\n * @param arr - the array to extract values from.\n * @param filter - a filter used to extract values from the provided array.\n * @returns the values that were extracted from the array.\n *\n * @example\n * ```ts\n * const numbers = [1, 2, 3, 4, 5, 6];\n * const numberFilter = (num: number): boolean => num > 3;\n * const extractedNumbers = arrayExtract(numbers, numberFilter);\n * console.log(numbers); // [1, 2, 3]\n * console.log(extractedNumbers); // [4, 5, 6]\n * ```\n *\n * @example\n * ```ts\n * const numbers = [1, 2, 3, 4, 5, 6];\n * const numberFilter = (num: number): boolean => num % 2 === 0;\n * const extractedNumbers = arrayExtract(numbers, numberFilter);\n * console.log(numbers); // [1, 3, 5]\n * console.log(extractedNumbers); // [2, 4, 6]\n * ```\n */\nexport function arrayExtract<T>(arr: T[], filter: (value: T) => unknown): T[] {\n const extractedValues: T[] = [];\n\n for (let i = 0; i - extractedValues.length < arr.length; i++) {\n const offsetIndex = i - extractedValues.length;\n\n const value = arr[offsetIndex];\n\n if (filter(value)) {\n arr.splice(offsetIndex, 1);\n extractedValues.push(value);\n }\n }\n\n return extractedValues;\n}\n\n/**\n * Creates groups of pull requests based on a list of `PullRequestGroupConfig`.\n * @param pullRequests - all pull requests to be split up into groups.\n * @param configs - the config used for splitting up the pull request groups.\n * @returns a list of pull request groups.\n */\nexport function getPullRequestGroups(\n pullRequests: DashboardPullRequest[] | undefined,\n configs: PullRequestGroupConfig[],\n): PullRequestGroup[] | undefined {\n if (!pullRequests) {\n return undefined;\n }\n\n const remainingPullRequests: DashboardPullRequest[] = [...pullRequests];\n const pullRequestGroups: PullRequestGroup[] = [];\n\n configs.forEach(({ title, filter: configFilter, simplified }) => {\n const groupPullRequests = arrayExtract(remainingPullRequests, configFilter);\n\n pullRequestGroups.push({\n title,\n pullRequests: groupPullRequests,\n simplified,\n });\n });\n\n return pullRequestGroups;\n}\n\nexport function getPullRequestGroupConfigs(\n columnConfigs: PullRequestColumnConfig[],\n filterProcessor: (filters: Filter[]) => Filter[],\n): PullRequestGroupConfig[] {\n return columnConfigs.map(columnConfig => {\n const filters = filterProcessor(columnConfig.filters);\n return {\n title: columnConfig.title,\n filter: createFilter(filters),\n simplified: columnConfig.simplified,\n };\n });\n}\n"],"names":[],"mappings":";;;AAiCO,SAAS,eAAe,QAA6B,EAAA;AAC1D,EAAO,OAAA,QAAA,CAAS,eAAe,qBAAsB,CAAA,MAAA,GACjD,CAAC,CAAC,QAAA,CAAS,UACX,GAAA,CAAC,QAAS,CAAA,WAAA
|
|
1
|
+
{"version":3,"file":"utils.esm.js","sources":["../../../../src/components/PullRequestsPage/lib/utils.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n DashboardPullRequest,\n PullRequestVoteStatus,\n Reviewer,\n} from '@backstage-community/plugin-azure-devops-common';\nimport { Filter, createFilter } from './filters';\nimport {\n PullRequestColumnConfig,\n PullRequestGroup,\n PullRequestGroupConfig,\n} from './types';\n\n/**\n * Filters a reviewer based on vote status and if the reviewer is required.\n * @param reviewer - a reviewer to filter.\n * @returns whether or not to filter the `reviewer`.\n */\nexport function reviewerFilter(reviewer: Reviewer): boolean {\n return reviewer.voteStatus === PullRequestVoteStatus.NoVote\n ? !!reviewer.isRequired\n : !reviewer.isContainer;\n}\n\n/**\n * Removes values from the provided array and returns them.\n * @param arr - the array to extract values from.\n * @param filter - a filter used to extract values from the provided array.\n * @returns the values that were extracted from the array.\n *\n * @example\n * ```ts\n * const numbers = [1, 2, 3, 4, 5, 6];\n * const numberFilter = (num: number): boolean => num > 3;\n * const extractedNumbers = arrayExtract(numbers, numberFilter);\n * console.log(numbers); // [1, 2, 3]\n * console.log(extractedNumbers); // [4, 5, 6]\n * ```\n *\n * @example\n * ```ts\n * const numbers = [1, 2, 3, 4, 5, 6];\n * const numberFilter = (num: number): boolean => num % 2 === 0;\n * const extractedNumbers = arrayExtract(numbers, numberFilter);\n * console.log(numbers); // [1, 3, 5]\n * console.log(extractedNumbers); // [2, 4, 6]\n * ```\n */\nexport function arrayExtract<T>(arr: T[], filter: (value: T) => unknown): T[] {\n const extractedValues: T[] = [];\n\n for (let i = 0; i - extractedValues.length < arr.length; i++) {\n const offsetIndex = i - extractedValues.length;\n\n const value = arr[offsetIndex];\n\n if (filter(value)) {\n arr.splice(offsetIndex, 1);\n extractedValues.push(value);\n }\n }\n\n return extractedValues;\n}\n\n/**\n * Creates groups of pull requests based on a list of `PullRequestGroupConfig`.\n * @param pullRequests - all pull requests to be split up into groups.\n * @param configs - the config used for splitting up the pull request groups.\n * @returns a list of pull request groups.\n */\nexport function getPullRequestGroups(\n pullRequests: DashboardPullRequest[] | undefined,\n configs: PullRequestGroupConfig[],\n): PullRequestGroup[] | undefined {\n if (!pullRequests) {\n return undefined;\n }\n\n const remainingPullRequests: DashboardPullRequest[] = [...pullRequests];\n const pullRequestGroups: PullRequestGroup[] = [];\n\n configs.forEach(({ title, filter: configFilter, simplified }) => {\n const groupPullRequests = arrayExtract(remainingPullRequests, configFilter);\n\n pullRequestGroups.push({\n title,\n pullRequests: groupPullRequests,\n simplified,\n });\n });\n\n return pullRequestGroups;\n}\n\nexport function getPullRequestGroupConfigs(\n columnConfigs: PullRequestColumnConfig[],\n filterProcessor: (filters: Filter[]) => Filter[],\n): PullRequestGroupConfig[] {\n return columnConfigs.map(columnConfig => {\n const filters = filterProcessor(columnConfig.filters);\n return {\n title: columnConfig.title,\n filter: createFilter(filters),\n simplified: columnConfig.simplified,\n };\n });\n}\n"],"names":[],"mappings":";;;AAiCO,SAAS,eAAe,QAA6B,EAAA;AAC1D,EAAO,OAAA,QAAA,CAAS,eAAe,qBAAsB,CAAA,MAAA,GACjD,CAAC,CAAC,QAAA,CAAS,UACX,GAAA,CAAC,QAAS,CAAA,WAAA;AAChB;AA0BgB,SAAA,YAAA,CAAgB,KAAU,MAAoC,EAAA;AAC5E,EAAA,MAAM,kBAAuB,EAAC;AAE9B,EAAA,KAAA,IAAS,IAAI,CAAG,EAAA,CAAA,GAAI,gBAAgB,MAAS,GAAA,GAAA,CAAI,QAAQ,CAAK,EAAA,EAAA;AAC5D,IAAM,MAAA,WAAA,GAAc,IAAI,eAAgB,CAAA,MAAA;AAExC,IAAM,MAAA,KAAA,GAAQ,IAAI,WAAW,CAAA;AAE7B,IAAI,IAAA,MAAA,CAAO,KAAK,CAAG,EAAA;AACjB,MAAI,GAAA,CAAA,MAAA,CAAO,aAAa,CAAC,CAAA;AACzB,MAAA,eAAA,CAAgB,KAAK,KAAK,CAAA;AAAA;AAC5B;AAGF,EAAO,OAAA,eAAA;AACT;AAQgB,SAAA,oBAAA,CACd,cACA,OACgC,EAAA;AAChC,EAAA,IAAI,CAAC,YAAc,EAAA;AACjB,IAAO,OAAA,KAAA,CAAA;AAAA;AAGT,EAAM,MAAA,qBAAA,GAAgD,CAAC,GAAG,YAAY,CAAA;AACtE,EAAA,MAAM,oBAAwC,EAAC;AAE/C,EAAA,OAAA,CAAQ,QAAQ,CAAC,EAAE,OAAO,MAAQ,EAAA,YAAA,EAAc,YAAiB,KAAA;AAC/D,IAAM,MAAA,iBAAA,GAAoB,YAAa,CAAA,qBAAA,EAAuB,YAAY,CAAA;AAE1E,IAAA,iBAAA,CAAkB,IAAK,CAAA;AAAA,MACrB,KAAA;AAAA,MACA,YAAc,EAAA,iBAAA;AAAA,MACd;AAAA,KACD,CAAA;AAAA,GACF,CAAA;AAED,EAAO,OAAA,iBAAA;AACT;AAEgB,SAAA,0BAAA,CACd,eACA,eAC0B,EAAA;AAC1B,EAAO,OAAA,aAAA,CAAc,IAAI,CAAgB,YAAA,KAAA;AACvC,IAAM,MAAA,OAAA,GAAU,eAAgB,CAAA,YAAA,CAAa,OAAO,CAAA;AACpD,IAAO,OAAA;AAAA,MACL,OAAO,YAAa,CAAA,KAAA;AAAA,MACpB,MAAA,EAAQ,aAAa,OAAO,CAAA;AAAA,MAC5B,YAAY,YAAa,CAAA;AAAA,KAC3B;AAAA,GACD,CAAA;AACH;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Box from '@
|
|
2
|
-
import Button from '@
|
|
3
|
-
import makeStyles from '@
|
|
1
|
+
import Box from '@material-ui/core/Box';
|
|
2
|
+
import Button from '@material-ui/core/Button';
|
|
3
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
4
4
|
import { Progress, InfoCard, MarkdownContent, EmptyState, ErrorPanel } from '@backstage/core-components';
|
|
5
5
|
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
6
6
|
import React from 'react';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadmeCard.esm.js","sources":["../../../src/components/ReadmeCard/ReadmeCard.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@
|
|
1
|
+
{"version":3,"file":"ReadmeCard.esm.js","sources":["../../../src/components/ReadmeCard/ReadmeCard.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport { makeStyles } from '@material-ui/core/styles';\nimport {\n InfoCard,\n Progress,\n MarkdownContent,\n EmptyState,\n ErrorPanel,\n} from '@backstage/core-components';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport React from 'react';\n\nimport { useReadme } from '../../hooks';\n\nconst useStyles = makeStyles(theme => ({\n readMe: {\n overflowY: 'auto',\n paddingRight: theme.spacing(1),\n '&::-webkit-scrollbar-track': {\n backgroundColor: '#F5F5F5',\n borderRadius: '5px',\n },\n '&::-webkit-scrollbar': {\n width: '5px',\n backgroundColor: '#F5F5F5',\n borderRadius: '5px',\n },\n '&::-webkit-scrollbar-thumb': {\n border: '1px solid #555555',\n backgroundColor: '#555',\n borderRadius: '4px',\n },\n },\n}));\n\ntype Props = {\n maxHeight?: number;\n};\n\ntype ErrorProps = {\n error: Error;\n};\n\nfunction isNotFoundError(error: any): boolean {\n return error?.response?.status === 404;\n}\n\nconst ReadmeCardError = ({ error }: ErrorProps) => {\n if (isNotFoundError(error)) {\n return (\n <EmptyState\n title=\"No README available for this entity\"\n missing=\"field\"\n description=\"You can add a README to your entity by following the Azure DevOps documentation.\"\n action={\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops\"\n >\n Read more\n </Button>\n }\n />\n );\n }\n return <ErrorPanel title={error.message} error={error} />;\n};\n\nexport const ReadmeCard = (props: Props) => {\n const classes = useStyles();\n const { entity } = useEntity();\n const { loading, error, item: value } = useReadme(entity);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ReadmeCardError error={error} />;\n }\n\n return (\n <InfoCard\n title=\"Readme\"\n deepLink={{\n link: value!.url,\n title: 'Readme',\n }}\n >\n <Box className={classes.readMe} sx={{ maxHeight: props.maxHeight }}>\n <MarkdownContent content={value?.content ?? ''} />\n </Box>\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA+BA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,MAAQ,EAAA;AAAA,IACN,SAAW,EAAA,MAAA;AAAA,IACX,YAAA,EAAc,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC7B,4BAA8B,EAAA;AAAA,MAC5B,eAAiB,EAAA,SAAA;AAAA,MACjB,YAAc,EAAA;AAAA,KAChB;AAAA,IACA,sBAAwB,EAAA;AAAA,MACtB,KAAO,EAAA,KAAA;AAAA,MACP,eAAiB,EAAA,SAAA;AAAA,MACjB,YAAc,EAAA;AAAA,KAChB;AAAA,IACA,4BAA8B,EAAA;AAAA,MAC5B,MAAQ,EAAA,mBAAA;AAAA,MACR,eAAiB,EAAA,MAAA;AAAA,MACjB,YAAc,EAAA;AAAA;AAChB;AAEJ,CAAE,CAAA,CAAA;AAUF,SAAS,gBAAgB,KAAqB,EAAA;AAC5C,EAAO,OAAA,KAAA,EAAO,UAAU,MAAW,KAAA,GAAA;AACrC;AAEA,MAAM,eAAkB,GAAA,CAAC,EAAE,KAAA,EAAwB,KAAA;AACjD,EAAI,IAAA,eAAA,CAAgB,KAAK,CAAG,EAAA;AAC1B,IACE,uBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,KAAM,EAAA,qCAAA;AAAA,QACN,OAAQ,EAAA,OAAA;AAAA,QACR,WAAY,EAAA,kFAAA;AAAA,QACZ,MACE,kBAAA,KAAA,CAAA,aAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,OAAQ,EAAA,WAAA;AAAA,YACR,KAAM,EAAA,SAAA;AAAA,YACN,IAAK,EAAA;AAAA,WAAA;AAAA,UACN;AAAA;AAED;AAAA,KAEJ;AAAA;AAGJ,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,KAAO,EAAA,KAAA,CAAM,SAAS,KAAc,EAAA,CAAA;AACzD,CAAA;AAEa,MAAA,UAAA,GAAa,CAAC,KAAiB,KAAA;AAC1C,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAA,MAAM,EAAE,OAAS,EAAA,KAAA,EAAO,MAAM,KAAM,EAAA,GAAI,UAAU,MAAM,CAAA;AAExD,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,2CAAQ,QAAS,EAAA,IAAA,CAAA;AAAA,aACR,KAAO,EAAA;AAChB,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,mBAAgB,KAAc,EAAA,CAAA;AAAA;AAGxC,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,QAAA;AAAA,MACN,QAAU,EAAA;AAAA,QACR,MAAM,KAAO,CAAA,GAAA;AAAA,QACb,KAAO,EAAA;AAAA;AACT,KAAA;AAAA,wCAEC,GAAI,EAAA,EAAA,SAAA,EAAW,OAAQ,CAAA,MAAA,EAAQ,IAAI,EAAE,SAAA,EAAW,KAAM,CAAA,SAAA,sBACpD,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA,EAAgB,SAAS,KAAO,EAAA,OAAA,IAAW,IAAI,CAClD;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBuildRuns.esm.js","sources":["../../src/hooks/useBuildRuns.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AZURE_DEVOPS_DEFAULT_TOP,\n BuildRun,\n BuildRunOptions,\n} from '@backstage-community/plugin-azure-devops-common';\n\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\n\nexport function useBuildRuns(\n entity: Entity,\n defaultLimit?: number,\n): {\n items?: BuildRun[];\n loading: boolean;\n error?: Error;\n} {\n const top = defaultLimit ?? AZURE_DEVOPS_DEFAULT_TOP;\n const options: BuildRunOptions = {\n top: top,\n };\n\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, definition, host, org } =\n getAnnotationValuesFromEntity(entity);\n return api.getBuildRuns(\n project,\n stringifyEntityRef(entity),\n repo,\n definition,\n host,\n org,\n options,\n );\n }, [api]);\n\n return {\n items: value?.items,\n loading,\n error,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;AA4BgB,SAAA,YAAA,CACd,QACA,YAKA,EAAA;AACA,EAAA,MAAM,MAAM,YAAgB,IAAA,wBAAA
|
|
1
|
+
{"version":3,"file":"useBuildRuns.esm.js","sources":["../../src/hooks/useBuildRuns.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AZURE_DEVOPS_DEFAULT_TOP,\n BuildRun,\n BuildRunOptions,\n} from '@backstage-community/plugin-azure-devops-common';\n\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\n\nexport function useBuildRuns(\n entity: Entity,\n defaultLimit?: number,\n): {\n items?: BuildRun[];\n loading: boolean;\n error?: Error;\n} {\n const top = defaultLimit ?? AZURE_DEVOPS_DEFAULT_TOP;\n const options: BuildRunOptions = {\n top: top,\n };\n\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, definition, host, org } =\n getAnnotationValuesFromEntity(entity);\n return api.getBuildRuns(\n project,\n stringifyEntityRef(entity),\n repo,\n definition,\n host,\n org,\n options,\n );\n }, [api]);\n\n return {\n items: value?.items,\n loading,\n error,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;AA4BgB,SAAA,YAAA,CACd,QACA,YAKA,EAAA;AACA,EAAA,MAAM,MAAM,YAAgB,IAAA,wBAAA;AAC5B,EAAA,MAAM,OAA2B,GAAA;AAAA,IAC/B;AAAA,GACF;AAEA,EAAM,MAAA,GAAA,GAAM,OAAO,iBAAiB,CAAA;AAEpC,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,SAAS,MAAM;AAC/C,IAAM,MAAA,EAAE,SAAS,IAAM,EAAA,UAAA,EAAY,MAAM,GAAI,EAAA,GAC3C,8BAA8B,MAAM,CAAA;AACtC,IAAA,OAAO,GAAI,CAAA,YAAA;AAAA,MACT,OAAA;AAAA,MACA,mBAAmB,MAAM,CAAA;AAAA,MACzB,IAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA;AAAA,MACA,GAAA;AAAA,MACA;AAAA,KACF;AAAA,GACF,EAAG,CAAC,GAAG,CAAC,CAAA;AAER,EAAO,OAAA;AAAA,IACL,OAAO,KAAO,EAAA,KAAA;AAAA,IACd,OAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDashboardPullRequests.esm.js","sources":["../../src/hooks/useDashboardPullRequests.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport useAsyncRetry from 'react-use/esm/useAsyncRetry';\nimport useInterval from 'react-use/esm/useInterval';\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { azureDevOpsApiRef } from '../api';\nimport { useCallback } from 'react';\n\nconst POLLING_INTERVAL = 10000;\n\nexport function useDashboardPullRequests(\n project?: string,\n pollingInterval: number = POLLING_INTERVAL,\n teamsLimit?: number,\n): {\n pullRequests?: DashboardPullRequest[];\n loading: boolean;\n error?: Error;\n} {\n const api = useApi(azureDevOpsApiRef);\n const errorApi = useApi(errorApiRef);\n\n const getDashboardPullRequests = useCallback(async (): Promise<\n DashboardPullRequest[]\n > => {\n if (!project) {\n return Promise.reject(new Error('Missing project name'));\n }\n\n try {\n return await api.getDashboardPullRequests(project, teamsLimit);\n } catch (error) {\n if (error instanceof Error) {\n errorApi.post(error);\n }\n\n return Promise.reject(error);\n }\n }, [project, api, teamsLimit, errorApi]);\n\n const {\n value: pullRequests,\n loading,\n error,\n retry,\n } = useAsyncRetry(\n () => getDashboardPullRequests(),\n [getDashboardPullRequests],\n );\n\n useInterval(() => retry(), pollingInterval);\n\n return {\n pullRequests,\n loading,\n error,\n };\n}\n"],"names":["error"],"mappings":";;;;;;;AAwBA,MAAM,gBAAmB,GAAA,GAAA
|
|
1
|
+
{"version":3,"file":"useDashboardPullRequests.esm.js","sources":["../../src/hooks/useDashboardPullRequests.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport useAsyncRetry from 'react-use/esm/useAsyncRetry';\nimport useInterval from 'react-use/esm/useInterval';\n\nimport { DashboardPullRequest } from '@backstage-community/plugin-azure-devops-common';\nimport { azureDevOpsApiRef } from '../api';\nimport { useCallback } from 'react';\n\nconst POLLING_INTERVAL = 10000;\n\nexport function useDashboardPullRequests(\n project?: string,\n pollingInterval: number = POLLING_INTERVAL,\n teamsLimit?: number,\n): {\n pullRequests?: DashboardPullRequest[];\n loading: boolean;\n error?: Error;\n} {\n const api = useApi(azureDevOpsApiRef);\n const errorApi = useApi(errorApiRef);\n\n const getDashboardPullRequests = useCallback(async (): Promise<\n DashboardPullRequest[]\n > => {\n if (!project) {\n return Promise.reject(new Error('Missing project name'));\n }\n\n try {\n return await api.getDashboardPullRequests(project, teamsLimit);\n } catch (error) {\n if (error instanceof Error) {\n errorApi.post(error);\n }\n\n return Promise.reject(error);\n }\n }, [project, api, teamsLimit, errorApi]);\n\n const {\n value: pullRequests,\n loading,\n error,\n retry,\n } = useAsyncRetry(\n () => getDashboardPullRequests(),\n [getDashboardPullRequests],\n );\n\n useInterval(() => retry(), pollingInterval);\n\n return {\n pullRequests,\n loading,\n error,\n };\n}\n"],"names":["error"],"mappings":";;;;;;;AAwBA,MAAM,gBAAmB,GAAA,GAAA;AAElB,SAAS,wBACd,CAAA,OAAA,EACA,eAA0B,GAAA,gBAAA,EAC1B,UAKA,EAAA;AACA,EAAM,MAAA,GAAA,GAAM,OAAO,iBAAiB,CAAA;AACpC,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AAEnC,EAAM,MAAA,wBAAA,GAA2B,YAAY,YAExC;AACH,IAAA,IAAI,CAAC,OAAS,EAAA;AACZ,MAAA,OAAO,OAAQ,CAAA,MAAA,CAAO,IAAI,KAAA,CAAM,sBAAsB,CAAC,CAAA;AAAA;AAGzD,IAAI,IAAA;AACF,MAAA,OAAO,MAAM,GAAA,CAAI,wBAAyB,CAAA,OAAA,EAAS,UAAU,CAAA;AAAA,aACtDA,MAAO,EAAA;AACd,MAAA,IAAIA,kBAAiB,KAAO,EAAA;AAC1B,QAAA,QAAA,CAAS,KAAKA,MAAK,CAAA;AAAA;AAGrB,MAAO,OAAA,OAAA,CAAQ,OAAOA,MAAK,CAAA;AAAA;AAC7B,KACC,CAAC,OAAA,EAAS,GAAK,EAAA,UAAA,EAAY,QAAQ,CAAC,CAAA;AAEvC,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,YAAA;AAAA,IACP,OAAA;AAAA,IACA,KAAA;AAAA,IACA;AAAA,GACE,GAAA,aAAA;AAAA,IACF,MAAM,wBAAyB,EAAA;AAAA,IAC/B,CAAC,wBAAwB;AAAA,GAC3B;AAEA,EAAY,WAAA,CAAA,MAAM,KAAM,EAAA,EAAG,eAAe,CAAA;AAE1C,EAAO,OAAA;AAAA,IACL,YAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGitTags.esm.js","sources":["../../src/hooks/useGitTags.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { GitTag } from '@backstage-community/plugin-azure-devops-common';\n\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\n\nexport function useGitTags(entity: Entity): {\n items?: GitTag[];\n loading: boolean;\n error?: Error;\n} {\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, host, org } = getAnnotationValuesFromEntity(entity);\n return api.getGitTags(\n project,\n repo as string,\n stringifyEntityRef(entity),\n host,\n org,\n );\n }, [api]);\n\n return {\n items: value?.items,\n loading,\n error,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;AAwBO,SAAS,WAAW,MAIzB,EAAA;AACA,EAAM,MAAA,GAAA,GAAM,OAAO,iBAAiB,CAAA
|
|
1
|
+
{"version":3,"file":"useGitTags.esm.js","sources":["../../src/hooks/useGitTags.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { GitTag } from '@backstage-community/plugin-azure-devops-common';\n\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\n\nexport function useGitTags(entity: Entity): {\n items?: GitTag[];\n loading: boolean;\n error?: Error;\n} {\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, host, org } = getAnnotationValuesFromEntity(entity);\n return api.getGitTags(\n project,\n repo as string,\n stringifyEntityRef(entity),\n host,\n org,\n );\n }, [api]);\n\n return {\n items: value?.items,\n loading,\n error,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;AAwBO,SAAS,WAAW,MAIzB,EAAA;AACA,EAAM,MAAA,GAAA,GAAM,OAAO,iBAAiB,CAAA;AAEpC,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,SAAS,MAAM;AAC/C,IAAA,MAAM,EAAE,OAAS,EAAA,IAAA,EAAM,MAAM,GAAI,EAAA,GAAI,8BAA8B,MAAM,CAAA;AACzE,IAAA,OAAO,GAAI,CAAA,UAAA;AAAA,MACT,OAAA;AAAA,MACA,IAAA;AAAA,MACA,mBAAmB,MAAM,CAAA;AAAA,MACzB,IAAA;AAAA,MACA;AAAA,KACF;AAAA,GACF,EAAG,CAAC,GAAG,CAAC,CAAA;AAER,EAAO,OAAA;AAAA,IACL,OAAO,KAAO,EAAA,KAAA;AAAA,IACd,OAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePullRequests.esm.js","sources":["../../src/hooks/usePullRequests.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AZURE_DEVOPS_DEFAULT_TOP,\n PullRequest,\n PullRequestOptions,\n PullRequestStatus,\n} from '@backstage-community/plugin-azure-devops-common';\n\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\n\nexport function usePullRequests(\n entity: Entity,\n defaultLimit?: number,\n requestedStatus?: PullRequestStatus,\n defaultTeamsLimit?: number,\n): {\n items?: PullRequest[];\n loading: boolean;\n error?: Error;\n} {\n const top = defaultLimit ?? AZURE_DEVOPS_DEFAULT_TOP;\n const teamsLimit = defaultTeamsLimit ?? undefined;\n const status = requestedStatus ?? PullRequestStatus.Active;\n const options: PullRequestOptions = {\n top,\n status,\n teamsLimit,\n };\n\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, host, org } = getAnnotationValuesFromEntity(entity);\n const entityRef = stringifyEntityRef(entity);\n return api.getPullRequests(\n project,\n repo as string,\n entityRef,\n host,\n org,\n options,\n );\n }, [api, top, status]);\n\n return {\n items: value?.items,\n loading,\n error,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;AA6BO,SAAS,eACd,CAAA,MAAA,EACA,YACA,EAAA,eAAA,EACA,iBAKA,EAAA;AACA,EAAA,MAAM,MAAM,YAAgB,IAAA,wBAAA
|
|
1
|
+
{"version":3,"file":"usePullRequests.esm.js","sources":["../../src/hooks/usePullRequests.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AZURE_DEVOPS_DEFAULT_TOP,\n PullRequest,\n PullRequestOptions,\n PullRequestStatus,\n} from '@backstage-community/plugin-azure-devops-common';\n\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\n\nexport function usePullRequests(\n entity: Entity,\n defaultLimit?: number,\n requestedStatus?: PullRequestStatus,\n defaultTeamsLimit?: number,\n): {\n items?: PullRequest[];\n loading: boolean;\n error?: Error;\n} {\n const top = defaultLimit ?? AZURE_DEVOPS_DEFAULT_TOP;\n const teamsLimit = defaultTeamsLimit ?? undefined;\n const status = requestedStatus ?? PullRequestStatus.Active;\n const options: PullRequestOptions = {\n top,\n status,\n teamsLimit,\n };\n\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, host, org } = getAnnotationValuesFromEntity(entity);\n const entityRef = stringifyEntityRef(entity);\n return api.getPullRequests(\n project,\n repo as string,\n entityRef,\n host,\n org,\n options,\n );\n }, [api, top, status]);\n\n return {\n items: value?.items,\n loading,\n error,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;AA6BO,SAAS,eACd,CAAA,MAAA,EACA,YACA,EAAA,eAAA,EACA,iBAKA,EAAA;AACA,EAAA,MAAM,MAAM,YAAgB,IAAA,wBAAA;AAC5B,EAAA,MAAM,aAAkC,KAAA,CAAA;AACxC,EAAM,MAAA,MAAA,GAAS,mBAAmB,iBAAkB,CAAA,MAAA;AACpD,EAAA,MAAM,OAA8B,GAAA;AAAA,IAClC,GAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAM,MAAA,GAAA,GAAM,OAAO,iBAAiB,CAAA;AAEpC,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,SAAS,MAAM;AAC/C,IAAA,MAAM,EAAE,OAAS,EAAA,IAAA,EAAM,MAAM,GAAI,EAAA,GAAI,8BAA8B,MAAM,CAAA;AACzE,IAAM,MAAA,SAAA,GAAY,mBAAmB,MAAM,CAAA;AAC3C,IAAA,OAAO,GAAI,CAAA,eAAA;AAAA,MACT,OAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,IAAA;AAAA,MACA,GAAA;AAAA,MACA;AAAA,KACF;AAAA,GACC,EAAA,CAAC,GAAK,EAAA,GAAA,EAAK,MAAM,CAAC,CAAA;AAErB,EAAO,OAAA;AAAA,IACL,OAAO,KAAO,EAAA,KAAA;AAAA,IACd,OAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReadme.esm.js","sources":["../../src/hooks/useReadme.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Readme } from '@backstage-community/plugin-azure-devops-common';\n\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\n\nexport function useReadme(entity: Entity): {\n item?: Readme;\n loading: boolean;\n error?: Error;\n} {\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, host, org, readmePath } =\n getAnnotationValuesFromEntity(entity);\n const entityRef = stringifyEntityRef(entity);\n return api.getReadme({\n project,\n repo: repo as string,\n entityRef,\n host,\n org,\n path: readmePath,\n });\n }, [api]);\n\n return {\n item: value,\n loading,\n error,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;AAwBO,SAAS,UAAU,MAIxB,EAAA;AACA,EAAM,MAAA,GAAA,GAAM,OAAO,iBAAiB,CAAA
|
|
1
|
+
{"version":3,"file":"useReadme.esm.js","sources":["../../src/hooks/useReadme.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Readme } from '@backstage-community/plugin-azure-devops-common';\n\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { azureDevOpsApiRef } from '../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getAnnotationValuesFromEntity } from '../utils';\n\nexport function useReadme(entity: Entity): {\n item?: Readme;\n loading: boolean;\n error?: Error;\n} {\n const api = useApi(azureDevOpsApiRef);\n\n const { value, loading, error } = useAsync(() => {\n const { project, repo, host, org, readmePath } =\n getAnnotationValuesFromEntity(entity);\n const entityRef = stringifyEntityRef(entity);\n return api.getReadme({\n project,\n repo: repo as string,\n entityRef,\n host,\n org,\n path: readmePath,\n });\n }, [api]);\n\n return {\n item: value,\n loading,\n error,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;AAwBO,SAAS,UAAU,MAIxB,EAAA;AACA,EAAM,MAAA,GAAA,GAAM,OAAO,iBAAiB,CAAA;AAEpC,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,SAAS,MAAM;AAC/C,IAAM,MAAA,EAAE,SAAS,IAAM,EAAA,IAAA,EAAM,KAAK,UAAW,EAAA,GAC3C,8BAA8B,MAAM,CAAA;AACtC,IAAM,MAAA,SAAA,GAAY,mBAAmB,MAAM,CAAA;AAC3C,IAAA,OAAO,IAAI,SAAU,CAAA;AAAA,MACnB,OAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,IAAA;AAAA,MACA,GAAA;AAAA,MACA,IAAM,EAAA;AAAA,KACP,CAAA;AAAA,GACH,EAAG,CAAC,GAAG,CAAC,CAAA;AAER,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,KAAA;AAAA,IACN,OAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|