feat: copyright added in all files
Signed-off-by: Talita Gregory Nunes Freire <talita.freire@dazn.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/plugin-github-pull-requests-board",
|
||||
"description": "A Backstage plugin that allows you to see all open Pull Requests for all the repositories owned by your team",
|
||||
"version": "0.1.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
@@ -9,6 +10,20 @@
|
||||
"main": "dist/index.esm.js",
|
||||
"types": "dist/index.d.ts"
|
||||
},
|
||||
"backstage": {
|
||||
"role": "frontend-plugin"
|
||||
},
|
||||
"homepage": "https://backstage.io",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/backstage/backstage",
|
||||
"directory": "plugins/github-pull-requests-board"
|
||||
},
|
||||
"keywords": [
|
||||
"backstage",
|
||||
"github",
|
||||
"pull requests"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "backstage-cli plugin:build",
|
||||
"start": "backstage-cli plugin:serve",
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
|
||||
import { GraphQlPullRequest, PullRequest } from '../utils/types';
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
|
||||
import { GraphQlPullRequests, PullRequestsNumber } from '../utils/types';
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import { useApi, githubAuthApiRef } from '@backstage/core-plugin-api';
|
||||
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { PropsWithChildren, FunctionComponent } from 'react';
|
||||
import { Box, Paper, CardActionArea } from '@material-ui/core';
|
||||
import CardHeader from './CardHeader';
|
||||
@@ -37,7 +52,7 @@ const Card: FunctionComponent<Props> = (props: PropsWithChildren<Props>) => {
|
||||
authorAvatar={authorAvatar}
|
||||
repositoryName={repositoryName}
|
||||
/>
|
||||
{ children }
|
||||
{children}
|
||||
</Box>
|
||||
</CardActionArea>
|
||||
</Paper>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Typography, Box } from '@material-ui/core';
|
||||
import { getElapsedTime } from '../../utils/functions';
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { default as Card } from './Card';
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { Typography, Box, IconButton } from '@material-ui/core';
|
||||
import RefreshIcon from '@material-ui/icons/Refresh';
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { default as InfoCardHeader } from './InfoCardHeader';
|
||||
|
||||
+15
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { ReactNode } from 'react';
|
||||
import { ToggleButton, ToggleButtonGroup } from '@material-ui/lab';
|
||||
import { Tooltip, Box } from '@material-ui/core';
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { default as PullRequestBoardOptions } from './PullRequestBoardOptions';
|
||||
|
||||
+17
-2
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { getApprovedReviews, getChangeRequests, getCommentedReviews } from '../../utils/functions';
|
||||
import { Reviews, Author } from '../../utils/types';
|
||||
@@ -44,7 +59,7 @@ const PullRequestCard: FunctionComponent<Props> = (props: Props) => {
|
||||
prUrl={url}
|
||||
>
|
||||
{!!approvedReviews.length && (
|
||||
<UserHeaderList label='👍' users={approvedReviews.map(({ author: reviewAuthor }) => reviewAuthor)}/>
|
||||
<UserHeaderList label='👍' users={approvedReviews.map(({ author: reviewAuthor }) => reviewAuthor)} />
|
||||
)}
|
||||
{!!commentsReviews.length && (
|
||||
<UserHeaderList
|
||||
@@ -53,7 +68,7 @@ const PullRequestCard: FunctionComponent<Props> = (props: Props) => {
|
||||
/>
|
||||
)}
|
||||
{!!changeRequests.length && (
|
||||
<UserHeaderList label='🚧' users={changeRequests.map(({ author: reviewAuthor }) => reviewAuthor)}/>
|
||||
<UserHeaderList label='🚧' users={changeRequests.map(({ author: reviewAuthor }) => reviewAuthor)} />
|
||||
)}
|
||||
</Card>
|
||||
);
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { default as PullRequestCard } from './PullRequestCard';
|
||||
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { Box, Chip } from '@material-ui/core';
|
||||
import { getApprovedReviews, getCommentedReviews } from '../../utils/functions';
|
||||
import { Card } from '../Card';
|
||||
import { Reviews, Author } from '../../utils/types';
|
||||
|
||||
type Props = {
|
||||
title: string;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
author: Author;
|
||||
url: string;
|
||||
reviews: Reviews;
|
||||
repositoryName: string;
|
||||
isDraft: boolean;
|
||||
}
|
||||
|
||||
const SmallPullRequestCard: FunctionComponent<Props> = (props: Props) => {
|
||||
const {
|
||||
title,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
author,
|
||||
url,
|
||||
reviews,
|
||||
repositoryName,
|
||||
isDraft,
|
||||
} = props;
|
||||
|
||||
const approvedReviews = getApprovedReviews(reviews);
|
||||
const commentsReviews = getCommentedReviews(reviews);
|
||||
|
||||
const containReviews = !!approvedReviews.length || !!commentsReviews.length;
|
||||
const cardTitle = isDraft ? `🔧 DRAFT - ${title}` : title;
|
||||
|
||||
return (
|
||||
<Card
|
||||
title={cardTitle}
|
||||
createdAt={createdAt}
|
||||
updatedAt={updatedAt}
|
||||
authorName={author.login}
|
||||
authorAvatar={author.avatarUrl}
|
||||
repositoryName={repositoryName}
|
||||
prUrl={url}
|
||||
>
|
||||
{
|
||||
containReviews && (
|
||||
<Box display='flex' width='100%' marginY={1}>
|
||||
{!!approvedReviews.length && (
|
||||
<Box marginX={1}>
|
||||
<Chip
|
||||
color='secondary'
|
||||
variant='outlined'
|
||||
size='small'
|
||||
label={`${approvedReviews.length} approvals 👍`}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
{!!commentsReviews.length && (
|
||||
<Chip
|
||||
color='primary'
|
||||
variant='outlined'
|
||||
size='small'
|
||||
label={`${commentsReviews.length} comments 💬`}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default SmallPullRequestCard;
|
||||
@@ -1 +0,0 @@
|
||||
export { default as SmallPullRequestCard } from './SmallPullRequestCard';
|
||||
+17
-13
@@ -1,12 +1,25 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { FunctionComponent, useState } from 'react';
|
||||
import { Grid, Typography } from '@material-ui/core';
|
||||
import ViewModuleIcon from '@material-ui/icons/ViewModule';
|
||||
import { Progress, InfoCard } from '@backstage/core-components';
|
||||
|
||||
import { InfoCardHeader } from '../../components/InfoCardHeader';
|
||||
import { PullRequestBoardOptions } from '../../components/PullRequestBoardOptions';
|
||||
import { Wrapper } from '../../components/Wrapper';
|
||||
import { SmallPullRequestCard } from '../../components/SmallPullRequestCard';
|
||||
import { PullRequestCard } from '../../components/PullRequestCard';
|
||||
import { usePullRequestsByTeam } from '../../hooks/usePullRequestsByTeam';
|
||||
import { PRCardFormating } from '../../utils/types';
|
||||
@@ -18,21 +31,12 @@ const TeamPullRequestsPage: FunctionComponent = () => {
|
||||
const { repositories } = useUserRepositories();
|
||||
const { loading, pullRequests, refreshPullRequests } = usePullRequestsByTeam(repositories);
|
||||
|
||||
const CardComponent = infoCardFormat.includes('compacted')
|
||||
? SmallPullRequestCard
|
||||
: PullRequestCard;
|
||||
|
||||
const header = (
|
||||
<InfoCardHeader onRefresh={refreshPullRequests}>
|
||||
<PullRequestBoardOptions
|
||||
onClickOption={(newFormats) => setInfoCardFormat(newFormats)}
|
||||
value={infoCardFormat}
|
||||
options={[
|
||||
{
|
||||
icon: <ViewModuleIcon />,
|
||||
value: 'compacted',
|
||||
ariaLabel: 'Cards compacted'
|
||||
},
|
||||
{
|
||||
icon: <DraftPrIcon />,
|
||||
value: 'draft',
|
||||
@@ -71,7 +75,7 @@ const TeamPullRequestsPage: FunctionComponent = () => {
|
||||
isDraft
|
||||
}, index) => (
|
||||
isDraft ? (infoCardFormat.includes('draft') === isDraft) &&
|
||||
<CardComponent
|
||||
<PullRequestCard
|
||||
key={`pull-request-${id}-${index}`}
|
||||
title={title}
|
||||
createdAt={createdAt}
|
||||
@@ -82,7 +86,7 @@ const TeamPullRequestsPage: FunctionComponent = () => {
|
||||
repositoryName={repository.name}
|
||||
isDraft={isDraft}
|
||||
/>
|
||||
: <CardComponent
|
||||
: <PullRequestCard
|
||||
key={`pull-request-${id}-${index}`}
|
||||
title={title}
|
||||
createdAt={createdAt}
|
||||
|
||||
+17
-13
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { FunctionComponent, useState } from 'react';
|
||||
import { Grid, Typography } from '@material-ui/core';
|
||||
import ViewModuleIcon from '@material-ui/icons/ViewModule';
|
||||
import FullscreenIcon from '@material-ui/icons/Fullscreen';
|
||||
|
||||
import { Progress, InfoCard } from '@backstage/core-components';
|
||||
@@ -8,7 +22,6 @@ import { Progress, InfoCard } from '@backstage/core-components';
|
||||
import { InfoCardHeader } from '../../components/InfoCardHeader';
|
||||
import { PullRequestBoardOptions } from '../../components/PullRequestBoardOptions';
|
||||
import { Wrapper } from '../../components/Wrapper';
|
||||
import { SmallPullRequestCard } from '../../components/SmallPullRequestCard';
|
||||
import { PullRequestCard } from '../../components/PullRequestCard';
|
||||
import { usePullRequestsByTeam } from '../../hooks/usePullRequestsByTeam';
|
||||
import { PRCardFormating } from '../../utils/types';
|
||||
@@ -20,10 +33,6 @@ const TeamPullRequestsTable: FunctionComponent = () => {
|
||||
const { repositories } = useUserRepositories();
|
||||
const { loading, pullRequests, refreshPullRequests } = usePullRequestsByTeam(repositories);
|
||||
|
||||
const CardComponent = infoCardFormat.includes('compacted')
|
||||
? SmallPullRequestCard
|
||||
: PullRequestCard;
|
||||
|
||||
const header = (
|
||||
<InfoCardHeader onRefresh={refreshPullRequests}>
|
||||
<PullRequestBoardOptions
|
||||
@@ -35,11 +44,6 @@ const TeamPullRequestsTable: FunctionComponent = () => {
|
||||
value: 'draft',
|
||||
ariaLabel: 'Show draft PRs'
|
||||
},
|
||||
{
|
||||
icon: <ViewModuleIcon />,
|
||||
value: 'compacted',
|
||||
ariaLabel: 'Cards compacted'
|
||||
},
|
||||
{
|
||||
icon: <FullscreenIcon />,
|
||||
value: 'fullscreen',
|
||||
@@ -78,7 +82,7 @@ const TeamPullRequestsTable: FunctionComponent = () => {
|
||||
isDraft
|
||||
}, index) => (
|
||||
isDraft ? (infoCardFormat.includes('draft') === isDraft) &&
|
||||
<CardComponent
|
||||
<PullRequestCard
|
||||
key={`pull-request-${id}-${index}`}
|
||||
title={title}
|
||||
createdAt={createdAt}
|
||||
@@ -89,7 +93,7 @@ const TeamPullRequestsTable: FunctionComponent = () => {
|
||||
repositoryName={repository.name}
|
||||
isDraft={isDraft}
|
||||
/>
|
||||
: <CardComponent
|
||||
: <PullRequestCard
|
||||
key={`pull-request-${id}-${index}`}
|
||||
title={title}
|
||||
createdAt={createdAt}
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import {
|
||||
Typography,
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { default as UserHeader } from './UserHeader';
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Typography, Box } from '@material-ui/core';
|
||||
import { filterSameUser } from '../../utils/functions';
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { default as UserHeaderList } from './UserHeaderList';
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { Grid, Box } from '@material-ui/core';
|
||||
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { default as Wrapper } from './Wrapper';
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
|
||||
const DraftPr = () => (
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { default as DraftPrIcon } from './DraftPr';
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { formatPRsByReviewDecision } from '../utils/functions';
|
||||
import { PullRequests, PullRequestsColumn } from '../utils/types';
|
||||
@@ -36,13 +51,13 @@ export function usePullRequestsByTeam(repositories: string[]) {
|
||||
);
|
||||
|
||||
const teamPullRequests = await Promise.allSettled(teamRepositoriesPromises)
|
||||
.then(promises => promises.reduce((acc, curr) => {
|
||||
.then(promises => promises.reduce((acc, curr) => {
|
||||
if (curr.status === 'fulfilled') {
|
||||
return [...acc, ...curr.value];
|
||||
}
|
||||
return acc;
|
||||
},[] as PullRequests)
|
||||
);
|
||||
}, [] as PullRequests)
|
||||
);
|
||||
|
||||
return teamPullRequests;
|
||||
},
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { useEntity, catalogApiRef } from '@backstage/plugin-catalog-react';
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
|
||||
@@ -1 +1,16 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { TeamPullRequestsTable, TeamPullRequestsPage } from './plugin';
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
import { TeamPullRequestsTable } from './plugin';
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { TeamPullRequestsTable, TeamPullRequestsPage } from './plugin';
|
||||
|
||||
describe('github-pull-requests-board', () => {
|
||||
it('should export TeamPullRequestsTable', () => {
|
||||
expect(TeamPullRequestsTable).toBeDefined();
|
||||
});
|
||||
it('should export TeamPullRequestsPage', () => {
|
||||
expect(TeamPullRequestsPage).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {
|
||||
createPlugin,
|
||||
createComponentExtension,
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { createRouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
export const rootRouteRef = createRouteRef({
|
||||
|
||||
@@ -1,2 +1,17 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '@testing-library/jest-dom';
|
||||
import 'cross-fetch/polyfill';
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export const COLUMNS = Object.freeze({
|
||||
REVIEW_REQUIRED: '🔍 Review required',
|
||||
REVIEW_IN_PROGRESS: '📝 Review in progress',
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import moment from 'moment';
|
||||
import { Reviews, PullRequests, ReviewDecision, PullRequestsColumn, Author } from './types';
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export type GraphQlPullRequest<T> = {
|
||||
repository: {
|
||||
pullRequest: T
|
||||
|
||||
Reference in New Issue
Block a user