Compare commits
21 Commits
pkg/dev/ub
...
3324f71544
Author | SHA1 | Date | |
---|---|---|---|
3324f71544 | |||
7ca6e63680 | |||
6ffb2915bf | |||
6bb8afd914 | |||
3eb96fc75e | |||
d6597270dd | |||
fbad143bed | |||
e3459d136e | |||
fe0e2667a0 | |||
0e93e7c52f | |||
832cca1c66 | |||
94bfb77d87 | |||
5a677d2491 | |||
fbb2b3f8da | |||
44182fd1cd | |||
4e9298f5b6 | |||
9dce43fd58 | |||
3fa2b5905a | |||
b456fe9f65 | |||
7309a2157b | |||
79a12e89f7 |
7
Makefile
7
Makefile
@ -16,8 +16,11 @@ vendor:
|
||||
tidy:
|
||||
go mod tidy
|
||||
|
||||
watch:
|
||||
modd
|
||||
deps:
|
||||
go get github.com/cortesi/modd/cmd/modd
|
||||
|
||||
watch: deps
|
||||
go run github.com/cortesi/modd/cmd/modd
|
||||
|
||||
lint:
|
||||
golangci-lint run --enable-all
|
||||
|
@ -9,6 +9,7 @@
|
||||
### Procédure
|
||||
|
||||
```bash
|
||||
cd client && npm install # Installation des dépendances client
|
||||
make watch # Surveiller les modifications sur le sources et compiler/démarrer le serveur
|
||||
```
|
||||
|
||||
|
9933
client/package-lock.json
generated
9933
client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -27,9 +27,9 @@
|
||||
"@fortawesome/fontawesome-free": "^5.11.2",
|
||||
"@types/node": "^13.13.4",
|
||||
"@types/react-dom": "^16.9.7",
|
||||
"@types/react-redux": "^7.1.7",
|
||||
"@types/react-router-dom": "^5.1.5",
|
||||
"@types/uuid": "^7.0.3",
|
||||
"@types/react-redux": "^7.1.7",
|
||||
"babel-loader": "^8.0.6",
|
||||
"css-loader": "^1.0.1",
|
||||
"extract-loader": "^3.1.0",
|
||||
@ -42,14 +42,15 @@
|
||||
"resolve-url-loader": "^3.0.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"ts-loader": "^7.0.2",
|
||||
"webpack": "^4.25.0",
|
||||
"webpack-cleanup-plugin": "^0.5.1",
|
||||
"webpack-cli": "^3.1.2",
|
||||
"ts-loader": "^7.0.2"
|
||||
"webpack-cli": "^3.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lourenci/react-kanban": "^0.15.0",
|
||||
"@lourenci/react-kanban": "^2.0.0",
|
||||
"bulma": "^0.7.2",
|
||||
"bulma-switch": "^2.0.0",
|
||||
"react": "^16.12.0",
|
||||
"react-dom": "^16.12.0",
|
||||
"react-redux": "^7.1.3",
|
||||
|
@ -1,18 +1,21 @@
|
||||
import React from 'react';
|
||||
import React, { Fragment } from 'react';
|
||||
import { Page } from '../Page';
|
||||
import { connect, DispatchProp } from 'react-redux';
|
||||
import Board from '@lourenci/react-kanban';
|
||||
import Board, { addColumn } from '@lourenci/react-kanban';
|
||||
import { fetchBoards } from '../../store/actions/boards';
|
||||
import { createIssue } from '../../store/actions/issues';
|
||||
import { createIssue, fetchIssues } from '../../store/actions/issues';
|
||||
import { buildKanboard, moveCard } from '../../store/actions/kanboards';
|
||||
import { Loader } from '../Loader';
|
||||
import { IssueCard } from './IssueCard';
|
||||
import { Modal } from '../Modal';
|
||||
import { fetchProjectsMilestones } from '../../store/actions/projects';
|
||||
|
||||
export interface BoardPageProps extends DispatchProp {
|
||||
board: any
|
||||
kanboard: any
|
||||
milestones: any
|
||||
}
|
||||
|
||||
export class BoardPage extends React.Component<BoardPageProps> {
|
||||
|
||||
state = {
|
||||
@ -22,7 +25,10 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
||||
title: "",
|
||||
body: "",
|
||||
project: ""
|
||||
}
|
||||
},
|
||||
compactMode: true,
|
||||
hasError: false,
|
||||
selectedMilestone: "",
|
||||
}
|
||||
|
||||
onNewCardTitleChange: (evt: any) => void;
|
||||
@ -40,41 +46,112 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
||||
this.onNewCardSaveClick = this.onNewCardSaveClick.bind(this);
|
||||
}
|
||||
|
||||
componentDidCatch(error, errorInfo) {
|
||||
// You can also log the error to an error reporting service
|
||||
console.error(error, errorInfo);
|
||||
}
|
||||
|
||||
handleMilestonesChange(e: any) {
|
||||
let m = (e.target as HTMLInputElement).value;
|
||||
this.setState(state => ({ ...state, selectedMilestone: m }), this.requestBuildKanboard);
|
||||
//this.requestBuildKanboard();
|
||||
}
|
||||
|
||||
render() {
|
||||
const { board } = this.props;
|
||||
return (
|
||||
<Page title={`${board ? (board.title + ' - ') : ''}GenGitKan`}>
|
||||
<div className="container is-fluid">
|
||||
{this.renderBoard()}
|
||||
</div>
|
||||
{this.renderBoard()}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
renderBoard() {
|
||||
const { kanboard } = this.props;
|
||||
|
||||
const { kanboard, board, milestones } = this.props;
|
||||
const { selectedMilestone } = this.state;
|
||||
|
||||
if (!kanboard) {
|
||||
return <Loader></Loader>
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="kanboard-container is-fullheight">
|
||||
<Board disableLaneDrag={true}
|
||||
renderCard={this.renderCard}
|
||||
renderLaneHeader={this.renderLaneHeader}
|
||||
onCardDragEnd={this.onCardDragEnd.bind(this)}>
|
||||
{kanboard}
|
||||
</Board>
|
||||
{ this.renderNewCardModal() }
|
||||
</div>
|
||||
<Fragment>
|
||||
<nav className="navbar is-light">
|
||||
<div className="container is-fluid">
|
||||
<div className="navbar-start">
|
||||
<div className="navbar-item">
|
||||
{board.title}
|
||||
</div>
|
||||
</div>
|
||||
<div className="navbar-end">
|
||||
<div className="navbar-item">
|
||||
<div className="select">
|
||||
<select onChange={this.handleMilestonesChange.bind(this)}>
|
||||
<option value="">Sélectionner un jalon</option>
|
||||
{
|
||||
milestones.length > 0 ? milestones.map((k: any) => {
|
||||
return (
|
||||
<optgroup label={k.project}>
|
||||
{
|
||||
k.milestones.map((m: any) => {
|
||||
return (
|
||||
<option value={m.title} key={m.id}>{m.title}</option>
|
||||
)
|
||||
})
|
||||
}
|
||||
</optgroup>
|
||||
)
|
||||
}) : ""
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div className="navbar-item">
|
||||
|
||||
<div className="field">
|
||||
|
||||
<input id="compactMode"
|
||||
checked={this.state.compactMode}
|
||||
onChange={this.onCompactModeChange.bind(this)}
|
||||
type="checkbox"
|
||||
className="switch is-outlined is-success"
|
||||
name="compactMode"
|
||||
/>
|
||||
<label htmlFor="compactMode">Mode compact</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href={`#/boards/${board.id}/edit`} className="navbar-item">
|
||||
<span className="icon">
|
||||
<i className="fa fa-edit fa-fw"></i>
|
||||
</span>
|
||||
<span>Modifier le tableau</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div className="container is-fluid">
|
||||
<div className="kanboard-container is-fullheight">
|
||||
<Board
|
||||
renderCard={this.renderCard.bind(this)}
|
||||
renderColumnHeader={this.renderLaneHeader.bind(this)}
|
||||
onCardDragEnd={this.onCardDragEnd.bind(this)}
|
||||
disableColumnDrag={true}
|
||||
>
|
||||
{kanboard}
|
||||
</Board>
|
||||
{this.renderNewCardModal()}
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
renderNewCardModal() {
|
||||
const { newCardModalActive, newCardLaneID } = this.state;
|
||||
const { board } = this.props;
|
||||
if (!board || !newCardLaneID) return null;
|
||||
if (!board || newCardLaneID === undefined) return null;
|
||||
|
||||
return (
|
||||
<Modal active={newCardModalActive}>
|
||||
<div className="new-card-modal">
|
||||
@ -86,17 +163,17 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
||||
<div className="message-body">
|
||||
<div className="field">
|
||||
<div className="control">
|
||||
<input className="input is-medium" type="text"
|
||||
<input className="input is-medium" type="text"
|
||||
placeholder="Titre de votre ticket..."
|
||||
value={this.state.newCard.title}
|
||||
value={this.state.newCard.title}
|
||||
onChange={this.onNewCardTitleChange} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="field">
|
||||
<div className="control">
|
||||
<textarea className="textarea"
|
||||
<textarea className="textarea"
|
||||
placeholder="Description du nouveau ticket..."
|
||||
value={this.state.newCard.body}
|
||||
value={this.state.newCard.body}
|
||||
onChange={this.onNewCardBodyChange}
|
||||
rows={10}>
|
||||
</textarea>
|
||||
@ -106,7 +183,7 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
||||
<div className="control is-expanded">
|
||||
<div className="select is-fullwidth">
|
||||
<select
|
||||
value={this.state.newCard.project}
|
||||
value={this.state.newCard.project}
|
||||
onChange={this.onNewCardProjectChange}>
|
||||
{
|
||||
board.projects.map((p: any, i: number) => {
|
||||
@ -119,7 +196,7 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
||||
</div>
|
||||
<div className="field is-grouped is-grouped-right">
|
||||
<p className="control">
|
||||
<a className="button is-light"
|
||||
<a className="button is-light"
|
||||
onClick={this.onNewCardCloseClick}>
|
||||
Annuler
|
||||
</a>
|
||||
@ -139,7 +216,7 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
||||
}
|
||||
|
||||
renderCard(card: any) {
|
||||
return <IssueCard card={card} />;
|
||||
return <IssueCard compact={this.state.compactMode} card={card} />;
|
||||
}
|
||||
|
||||
renderLaneHeader(lane: any) {
|
||||
@ -147,28 +224,49 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
||||
<div className="kanboard-lane">
|
||||
<div className="level">
|
||||
<div className="level-left">
|
||||
<h3 className="level-item is-size-3">{lane.title}</h3>
|
||||
<div className="level-item">
|
||||
<span className="tag is-primary is-light is-normal">{lane.cards.length}</span>
|
||||
</div>
|
||||
<button className="button is-light level-item is-small expand"
|
||||
onClick={this.onMinimizeColumn}>
|
||||
<span className="icon">
|
||||
<i className="fas fa-chevron-right" aria-hidden="true"></i>
|
||||
</span>
|
||||
</button>
|
||||
<h3 className="level-item is-size-5">
|
||||
{lane.title}
|
||||
</h3>
|
||||
</div>
|
||||
<div className="level-right">
|
||||
<button className="button is-light level-item is-medium"
|
||||
<div className="level-right is-show-expand">
|
||||
<button className="button is-light level-item is-small"
|
||||
onClick={this.onNewCardClick.bind(this, lane.id)}>
|
||||
<span className="icon">
|
||||
<i className="fas fa-plus" aria-hidden="true"></i>
|
||||
</span>
|
||||
</button>
|
||||
<button className="button is-light level-item is-small"
|
||||
onClick={this.onMinimizeColumn}>
|
||||
<span className="icon">
|
||||
<i className="fas fa-chevron-left" aria-hidden="true"></i>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
onCardDragEnd(source: any, dest: any) {
|
||||
onMinimizeColumn(e: any) {
|
||||
e.currentTarget.closest('.react-kanban-column').classList.toggle('minimized');
|
||||
}
|
||||
|
||||
onCardDragEnd(card: any, source: any, dest: any) {
|
||||
const { board } = this.props;
|
||||
this.props.dispatch(moveCard(
|
||||
board.id,
|
||||
source.fromLaneId,
|
||||
source.fromColumnId,
|
||||
source.fromPosition,
|
||||
dest.toLaneId,
|
||||
dest.toColumnId,
|
||||
dest.toPosition
|
||||
));
|
||||
}
|
||||
@ -185,8 +283,8 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
||||
|
||||
onNewCardClick(laneID: string) {
|
||||
const { board } = this.props;
|
||||
this.setState({
|
||||
newCardModalActive: true,
|
||||
this.setState({
|
||||
newCardModalActive: true,
|
||||
newCardLaneID: laneID,
|
||||
newCard: {
|
||||
title: "",
|
||||
@ -218,9 +316,9 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
||||
const { board } = this.props;
|
||||
this.setState({ newCardModalActive: false });
|
||||
this.props.dispatch(createIssue(
|
||||
newCard.project,
|
||||
newCard.title,
|
||||
newCard.body,
|
||||
newCard.project,
|
||||
newCard.title,
|
||||
newCard.body,
|
||||
board.lanes[newCardLaneID].issueLabel
|
||||
));
|
||||
}
|
||||
@ -235,16 +333,24 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
||||
|
||||
requestBuildKanboard() {
|
||||
const { board } = this.props;
|
||||
const { selectedMilestone } = this.state;
|
||||
if (!board) return;
|
||||
this.props.dispatch(buildKanboard(board));
|
||||
this.props.dispatch(fetchProjectsMilestones(board.projects));
|
||||
this.props.dispatch(buildKanboard(board, selectedMilestone));
|
||||
}
|
||||
|
||||
onCompactModeChange(evt: React.ChangeEvent) {
|
||||
const checked = (evt.currentTarget as HTMLInputElement).checked;
|
||||
this.setState(state => ({ ...state, compactMode: checked }));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export const ConnectedBoardPage = connect(function(state: any, props: any) {
|
||||
export const ConnectedBoardPage = connect(function (state: any, props: any) {
|
||||
const boardID = props.match.params.id;
|
||||
return {
|
||||
board: state.boards.byID[boardID],
|
||||
kanboard: state.kanboards.byID[boardID]
|
||||
kanboard: state.kanboards.byID[boardID],
|
||||
milestones: state.projects.milestones
|
||||
};
|
||||
})(BoardPage);
|
@ -1,50 +1,63 @@
|
||||
import React from 'react';
|
||||
import { KanboardCard } from '../../types/kanboard';
|
||||
|
||||
export interface IssueCardProps {
|
||||
card: any
|
||||
card: KanboardCard
|
||||
compact: boolean
|
||||
}
|
||||
|
||||
export class IssueCard extends React.PureComponent<IssueCardProps> {
|
||||
render() {
|
||||
const { card } = this.props;
|
||||
|
||||
const { card, compact } = this.props;
|
||||
const issueURLInfo = extractInfoFromIssueURL(card.issue.url);
|
||||
const projectURL = `${issueURLInfo.baseURL}/${issueURLInfo.owner}/${issueURLInfo.projectName}`;
|
||||
const issueURL = `${projectURL}/issues/${card.issue.number}`;
|
||||
|
||||
return (
|
||||
<div className="kanboard-card">
|
||||
<div className="box">
|
||||
<div className="box has-padding-small is-radiusless">
|
||||
<div className="media">
|
||||
{
|
||||
card.issue.assignee ?
|
||||
<div className="media-left">
|
||||
<figure className="image is-64x64">
|
||||
<img src={card.issue.assignee.avatar_url} alt="Image" />
|
||||
</figure>
|
||||
<small>{`@${card.issue.assignee.login}`}</small>
|
||||
</div>
|
||||
: null
|
||||
}
|
||||
<div className="media-content">
|
||||
<div className="content">
|
||||
<p>
|
||||
<strong>{`#${card.issue.number}`}</strong>
|
||||
{ card.issue.milestone ? <small>{`- ${card.issue.milestone.title}`}</small> : null }
|
||||
<br />
|
||||
<span className="is-size-6">{card.issue.title}</span>
|
||||
</p>
|
||||
{ !compact &&
|
||||
<nav className="level">
|
||||
<div className="level-left">
|
||||
<div className="level-item">
|
||||
<a target="_blank" href={issueURL}><strong>{`#${card.issue.number}`}</strong></a>
|
||||
</div>
|
||||
{ !compact &&
|
||||
<div className="level-item">
|
||||
<a target="_blank" href={projectURL}>{card.project}</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div className="level-right">
|
||||
{
|
||||
card.issue.assignee && !compact ?
|
||||
<div className="level-item">
|
||||
<small>{`@${card.issue.assignee.login}`}</small>
|
||||
</div>
|
||||
: null
|
||||
}
|
||||
</div>
|
||||
</nav>
|
||||
}
|
||||
{ compact &&
|
||||
<a target="_blank" className="mr-1" href={issueURL}><strong>{`#${card.issue.number}`}</strong></a>
|
||||
}
|
||||
<span>{card.issue.title ? card.issue.title : ''}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="level is-mobile" style={{marginTop:'1rem'}}>
|
||||
<div className="level-left">
|
||||
<small className="level-item"><a href={projectURL}>{card.project}</a></small>
|
||||
</div>
|
||||
<div className="level-right">
|
||||
<a className="level-item" target="_blank" href={issueURL}>
|
||||
<span className="icon is-small has-text-info">
|
||||
<i className="fas fa-search" aria-hidden="true"></i>
|
||||
</span>
|
||||
</a>
|
||||
{ !compact &&
|
||||
<nav className="level">
|
||||
<div className="level-left"></div>
|
||||
<div className="level-right">
|
||||
<div className="level-item is-size-7">
|
||||
{card.issue.milestone ? card.issue.milestone.title : ''}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,6 @@
|
||||
@import 'bulma/bulma.sass';
|
||||
@import '../../node_modules/@lourenci/react-kanban/dist/styles.css';
|
||||
@import 'bulma-switch/dist/css/bulma-switch.sass';
|
||||
@import '_base.scss';
|
||||
@import '_loader.scss';
|
||||
@import '_kanboard.scss';
|
||||
@import '_kanboard.scss';
|
||||
|
@ -11,7 +11,15 @@ html, body {
|
||||
margin-top: $size-normal;
|
||||
}
|
||||
|
||||
.has-padding-small {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#app {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.mr-1 {
|
||||
margin-right: 5px;
|
||||
}
|
@ -44,6 +44,12 @@
|
||||
|
||||
.kanboard-lane {
|
||||
margin-bottom: $size-small;
|
||||
background: $white;
|
||||
top: 0;
|
||||
|
||||
.expand {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,4 +57,142 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.react-kanban-board {
|
||||
max-height: calc(100vh - calc(52px * 2));
|
||||
overflow: hidden;
|
||||
overflow-x: scroll;
|
||||
|
||||
scrollbar-color: $grey-lighter, #f1f1f1;
|
||||
scrollbar-width: 5px;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
/* Track */
|
||||
&::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
/* Handle */
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: $grey-lighter;
|
||||
}
|
||||
|
||||
/* Handle on hover */
|
||||
&::-webkit-scrollbar-thumb:hover {
|
||||
background: $green;
|
||||
}
|
||||
}
|
||||
|
||||
.react-kanban-column {
|
||||
transition: width ease .2s;
|
||||
max-width: 305px;
|
||||
min-width: 305px;
|
||||
position: relative;
|
||||
|
||||
max-height: 100%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
|
||||
scrollbar-color: $grey-lighter, #f1f1f1;
|
||||
scrollbar-width: 5px;
|
||||
|
||||
.kanboard-card {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&.minimized {
|
||||
max-width: 70px;
|
||||
min-width: 70px;
|
||||
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: sideways-right;
|
||||
|
||||
|
||||
|
||||
.level-item {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.level-left {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.level-right.is-show-expand {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.kanboard-lane {
|
||||
/*margin-right: -1em;*/
|
||||
|
||||
h3 {
|
||||
margin-top: .5em;
|
||||
/*margin-right: -.5em;*/
|
||||
}
|
||||
|
||||
.tag {
|
||||
writing-mode: horizontal-tb;
|
||||
}
|
||||
|
||||
.expand {
|
||||
display: block !important;
|
||||
margin-top: .5em;
|
||||
}
|
||||
}
|
||||
|
||||
.kanboard-card {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
/* Track */
|
||||
&::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
/* Handle */
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: $grey-lighter;
|
||||
}
|
||||
|
||||
/* Handle on hover */
|
||||
&::-webkit-scrollbar-thumb:hover {
|
||||
background: $green;
|
||||
}
|
||||
}
|
||||
|
||||
.react-kanban-card__title {
|
||||
position: sticky;
|
||||
position: -webkit-sticky;
|
||||
}
|
||||
|
||||
.react-kanban-column {
|
||||
background: white !important;
|
||||
}
|
||||
|
||||
|
||||
.kanboard-card {
|
||||
overflow-wrap: break-word;
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.level {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.level-item {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
@ -2,8 +2,8 @@ export const FETCH_ISSUES_REQUEST = "FETCH_ISSUES_REQUEST";
|
||||
export const FETCH_ISSUES_SUCCESS = "FETCH_ISSUES_SUCCESS";
|
||||
export const FETCH_ISSUES_FAILURE = "FETCH_ISSUES_FAILURE";
|
||||
|
||||
export function fetchIssues(project: any) {
|
||||
return { type: FETCH_ISSUES_REQUEST, project };
|
||||
export function fetchIssues(project: any, milestones: string) {
|
||||
return { type: FETCH_ISSUES_REQUEST, project, milestones };
|
||||
};
|
||||
|
||||
export const ADD_LABEL_REQUEST = "ADD_LABEL_REQUEST";
|
||||
|
@ -2,8 +2,8 @@ export const BUILD_KANBOARD_REQUEST = "BUILD_KANBOARD_REQUEST";
|
||||
export const BUILD_KANBOARD_SUCCESS = "BUILD_KANBOARD_SUCCESS";
|
||||
export const BUILD_KANBOARD_FAILURE = "BUILD_KANBOARD_FAILURE";
|
||||
|
||||
export function buildKanboard(board: string) {
|
||||
return { type: BUILD_KANBOARD_REQUEST, board };
|
||||
export function buildKanboard(board: string, milestones: string) {
|
||||
return { type: BUILD_KANBOARD_REQUEST, board, milestones };
|
||||
};
|
||||
|
||||
export const MOVE_CARD = "MOVE_CARD";
|
||||
|
@ -2,6 +2,14 @@ export const FETCH_PROJECTS_REQUEST = "FETCH_PROJECTS_REQUEST";
|
||||
export const FETCH_PROJECTS_SUCCESS = "FETCH_PROJECTS_SUCCESS";
|
||||
export const FETCH_PROJECTS_FAILURE = "FETCH_PROJECTS_FAILURE";
|
||||
|
||||
export const FETCH_PROJECT_MILESTONES_REQUEST = "FETCH_PROJECTS_MILESTONES_REQUEST";
|
||||
export const FETCH_PROJECT_MILESTONES_SUCCESS = "FETCH_PROJECTS_MILESTONES_SUCCESS";
|
||||
export const FETCH_PROJECT_MILESTONES_FAILURE = "FETCH_PROJECTS_MILESTONES_FAILURE";
|
||||
|
||||
export function fetchProjects() {
|
||||
return { type: FETCH_PROJECTS_REQUEST };
|
||||
};
|
||||
|
||||
export function fetchProjectsMilestones(projects: any) {
|
||||
return { type: FETCH_PROJECT_MILESTONES_REQUEST, projects };
|
||||
};
|
@ -37,22 +37,22 @@ function handleMoveCard(state: any, action: any) {
|
||||
|
||||
const kanboard = state.byID[boardID];
|
||||
|
||||
const lanes = [ ...kanboard.lanes ];
|
||||
const fromLane = lanes[fromLaneID];
|
||||
const toLane = lanes[toLaneID];
|
||||
const columns = [ ...kanboard.columns ];
|
||||
const fromLane = columns[fromLaneID];
|
||||
const toLane = columns[toLaneID];
|
||||
const card = fromLane.cards[fromPosition];
|
||||
|
||||
const fromCards = [ ...fromLane.cards ];
|
||||
if (fromLaneID !== toLaneID) {
|
||||
fromCards.splice(fromPosition, 1);
|
||||
lanes[fromLaneID] = {
|
||||
columns[fromLaneID] = {
|
||||
...fromLane,
|
||||
cards: fromCards,
|
||||
};
|
||||
|
||||
const toCards = [ ...toLane.cards ];
|
||||
toCards.splice(toPosition, 0, card);
|
||||
lanes[toLaneID] = {
|
||||
columns[toLaneID] = {
|
||||
...toLane,
|
||||
cards: toCards,
|
||||
};
|
||||
@ -67,7 +67,7 @@ function handleMoveCard(state: any, action: any) {
|
||||
...state.byID,
|
||||
[boardID]: {
|
||||
...state.byID[boardID],
|
||||
lanes,
|
||||
columns,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
@ -1,13 +1,18 @@
|
||||
import { FETCH_PROJECTS_SUCCESS } from "../actions/projects";
|
||||
import { FETCH_PROJECTS_SUCCESS, FETCH_PROJECT_MILESTONES_SUCCESS } from "../actions/projects";
|
||||
|
||||
export const defaultState = {
|
||||
byName: {},
|
||||
milestones: {}
|
||||
};
|
||||
|
||||
export function projectsReducer(state = defaultState, action: any) {
|
||||
switch(action.type) {
|
||||
switch (action.type) {
|
||||
case FETCH_PROJECTS_SUCCESS:
|
||||
return handleFetchProjectsSuccess(state, action);
|
||||
|
||||
case FETCH_PROJECT_MILESTONES_SUCCESS:
|
||||
return handleFetchProjectMilestonesSuccess(state, action);
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
@ -24,4 +29,12 @@ function handleFetchProjectsSuccess(state: any, action: any) {
|
||||
...projectsByName,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function handleFetchProjectMilestonesSuccess(state: any, action: any) {
|
||||
console.log(action.milestones);
|
||||
return {
|
||||
...state,
|
||||
milestones: action.milestones,
|
||||
};
|
||||
}
|
@ -1,10 +1,11 @@
|
||||
import { GiteaUnauthorizedError } from "../../util/gitea";
|
||||
import { put } from 'redux-saga/effects';
|
||||
import { logout } from '../actions/logout';
|
||||
import { saveReferer } from "../../util/referer";
|
||||
|
||||
export function* failuresSaga(action) {
|
||||
const err = action.error;
|
||||
if (err instanceof GiteaUnauthorizedError) {
|
||||
if (action.error instanceof GiteaUnauthorizedError) {
|
||||
saveReferer();
|
||||
yield put(logout());
|
||||
}
|
||||
}
|
||||
|
@ -1,28 +1,28 @@
|
||||
import { put, call, retry } from 'redux-saga/effects';
|
||||
import {
|
||||
FETCH_ISSUES_SUCCESS, FETCH_ISSUES_FAILURE,
|
||||
ADD_LABEL_FAILURE, ADD_LABEL_SUCCESS,
|
||||
REMOVE_LABEL_FAILURE, REMOVE_LABEL_SUCCESS,
|
||||
CREATE_ISSUE_FAILURE, CREATE_ISSUE_SUCCESS
|
||||
import {
|
||||
FETCH_ISSUES_SUCCESS, FETCH_ISSUES_FAILURE,
|
||||
ADD_LABEL_FAILURE, ADD_LABEL_SUCCESS,
|
||||
REMOVE_LABEL_FAILURE, REMOVE_LABEL_SUCCESS,
|
||||
CREATE_ISSUE_FAILURE, CREATE_ISSUE_SUCCESS
|
||||
} from '../actions/issues';
|
||||
import { gitea } from '../../util/gitea';
|
||||
|
||||
export function* fetchIssuesSaga(action: any) {
|
||||
const { project } = action;
|
||||
const { project, milestones } = action;
|
||||
|
||||
let issues = [];
|
||||
try {
|
||||
let page = 1;
|
||||
while(true) {
|
||||
let pageIssues = yield call(gitea.fetchIssues.bind(gitea), action.project, page);
|
||||
while (true) {
|
||||
let pageIssues = yield call(gitea.fetchIssues.bind(gitea), project, page, milestones);
|
||||
if (pageIssues.length === 0) {
|
||||
break;
|
||||
}
|
||||
issues.push(...pageIssues);
|
||||
issues.push(...pageIssues.filter(issue => issue.pull_request === null));
|
||||
page++;
|
||||
}
|
||||
|
||||
} catch(error) {
|
||||
|
||||
} catch (error) {
|
||||
yield put({ type: FETCH_ISSUES_FAILURE, project, error });
|
||||
return;
|
||||
}
|
||||
@ -42,7 +42,7 @@ export function* addLabelSaga(action: any) {
|
||||
|
||||
try {
|
||||
yield retry(5, 250, gitea.addIssueLabel.bind(gitea), project, issueNumber, giteaLabel.id);
|
||||
} catch(error) {
|
||||
} catch (error) {
|
||||
yield put({ type: ADD_LABEL_FAILURE, error });
|
||||
return;
|
||||
}
|
||||
@ -62,11 +62,11 @@ export function* removeLabelSaga(action: any) {
|
||||
|
||||
try {
|
||||
yield retry(5, 250, gitea.removeIssueLabel.bind(gitea), project, issueNumber, giteaLabel.id);
|
||||
} catch(error) {
|
||||
} catch (error) {
|
||||
yield put({ type: REMOVE_LABEL_FAILURE, error });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
yield put({ type: REMOVE_LABEL_SUCCESS, project, issueNumber, label });
|
||||
}
|
||||
@ -76,19 +76,14 @@ export function* createIssueSaga(action: any) {
|
||||
const labels = yield call(gitea.fetchProjectLabels.bind(gitea), project);
|
||||
const giteaLabel = labels.find((l: any) => l.name === label)
|
||||
|
||||
if (!giteaLabel) {
|
||||
yield put({ type: CREATE_ISSUE_FAILURE, error: new Error(`Label "${label}" not found !`) });
|
||||
return;
|
||||
}
|
||||
|
||||
let issue;
|
||||
try {
|
||||
issue = yield call(gitea.createIssue.bind(gitea), project, title, body, giteaLabel.id);
|
||||
} catch(error) {
|
||||
issue = yield call(gitea.createIssue.bind(gitea), project, title, body, giteaLabel ? giteaLabel.id : null);
|
||||
} catch (error) {
|
||||
yield put({ type: CREATE_ISSUE_FAILURE, error });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
yield put({ type: CREATE_ISSUE_SUCCESS, project, title, label, body, issue });
|
||||
}
|
||||
|
@ -7,22 +7,22 @@ import { Board, BoardLane } from '../../types/board';
|
||||
import { KanboardLane, Kanboard, KanboardCard } from '../../types/kanboard';
|
||||
|
||||
export function* moveCardSaga(action: any) {
|
||||
const {
|
||||
boardID, fromLaneID,
|
||||
const {
|
||||
boardID, fromLaneID,
|
||||
fromPosition, toLaneID,
|
||||
toPosition,
|
||||
} = action;
|
||||
|
||||
if (fromLaneID === toLaneID) return;
|
||||
|
||||
const { board, kanboard} = yield select(state => {
|
||||
const { board, kanboard } = yield select(state => {
|
||||
return {
|
||||
kanboard: state.kanboards.byID[boardID],
|
||||
kanboard: state.kanboards.byID[boardID],
|
||||
board: state.boards.byID[boardID]
|
||||
}
|
||||
});
|
||||
|
||||
const toLane = kanboard.lanes[toLaneID];
|
||||
const toLane = kanboard.columns[toLaneID];
|
||||
const card = toLane.cards[toPosition];
|
||||
|
||||
if (!card) return;
|
||||
@ -33,21 +33,21 @@ export function* moveCardSaga(action: any) {
|
||||
}
|
||||
|
||||
export function* buildKanboardSaga(action: any) {
|
||||
const { board } = action;
|
||||
|
||||
const { board, milestones } = action;
|
||||
console.log("milestones", milestones);
|
||||
let kanboard;
|
||||
try {
|
||||
|
||||
for (let p, i = 0; (p = board.projects[i]); i++) {
|
||||
const { project } = yield fetchIssues(p);
|
||||
yield fetchIssuesSaga({ project });
|
||||
const { project } = yield fetchIssues(p, milestones);
|
||||
yield fetchIssuesSaga({ project: project, milestones: milestones });
|
||||
}
|
||||
|
||||
const issues = yield select(state => state.issues);
|
||||
|
||||
kanboard = createKanboard(board, issues);
|
||||
|
||||
} catch(error) {
|
||||
} catch (error) {
|
||||
yield put({ type: BUILD_KANBOARD_FAILURE, error });
|
||||
return
|
||||
}
|
||||
@ -56,14 +56,14 @@ export function* buildKanboardSaga(action: any) {
|
||||
}
|
||||
|
||||
export function* refreshKanboardSaga(action: any) {
|
||||
const { project } = action;
|
||||
const { project, milestones } = action;
|
||||
const boards = yield select(state => state.boards);
|
||||
const boardValues = Object.values(boards.byID);
|
||||
const boardValues = Object.values(boards.byID);
|
||||
|
||||
for (let b: any, i = 0; (b = boardValues[i]); i++) {
|
||||
const hasProject = b.projects.indexOf(project) !== -1;
|
||||
if (!hasProject) continue;
|
||||
yield put(buildKanboard(b));
|
||||
yield put(buildKanboard(b, milestones));
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,19 +73,19 @@ function createCards(projects: Project[], issues: any, lane: BoardLane, rest: Se
|
||||
const projectIssues = p in issues.byProject ? issues.byProject[p] : [];
|
||||
|
||||
return projectIssues.reduce((projectCards: KanboardCard[], issue: any) => {
|
||||
|
||||
|
||||
const hasLabel = issue.labels.some((l: any) => l.name === lane.issueLabel);
|
||||
const card = getMemoizedKanboardCard(issue.id, issue.title, p, issue);
|
||||
const { card, memoized } = getMemoizedKanboardCard(issue.id, issue.title, p, issue);
|
||||
|
||||
if (hasLabel) {
|
||||
projectCards.push(card);
|
||||
rest.delete(card);
|
||||
} else {
|
||||
rest.add(card);
|
||||
if (!memoized) rest.add(card);
|
||||
}
|
||||
|
||||
return projectCards;
|
||||
|
||||
|
||||
}, laneCards);
|
||||
|
||||
}, []);
|
||||
@ -93,13 +93,21 @@ function createCards(projects: Project[], issues: any, lane: BoardLane, rest: Se
|
||||
return cards;
|
||||
}
|
||||
|
||||
const kanboardCardMemo: {[key: string]: KanboardCard} = {};
|
||||
const kanboardCardMemo: { [key: string]: KanboardCard } = {};
|
||||
|
||||
function getMemoizedKanboardCard(id: number, title: string, project: Project, issue: Issue): KanboardCard {
|
||||
const key = `${project.id}-${issue.id}-${id}`;
|
||||
if (kanboardCardMemo.hasOwnProperty(key)) return kanboardCardMemo[key];
|
||||
function getKanboardCardMemoizationKey(id: number, project: Project, issue: Issue) {
|
||||
return `${project.id}-${issue.id}-${id}`;
|
||||
}
|
||||
|
||||
function isKanboardCardMemoized(key: string) {
|
||||
return kanboardCardMemo.hasOwnProperty(key)
|
||||
}
|
||||
|
||||
function getMemoizedKanboardCard(id: number, title: string, project: Project, issue: Issue) {
|
||||
const key = getKanboardCardMemoizationKey(id, project, issue);
|
||||
if (isKanboardCardMemoized(key)) return { card: kanboardCardMemo[key], memoized: true };
|
||||
kanboardCardMemo[key] = { id, title, project, issue };
|
||||
return kanboardCardMemo[key];
|
||||
return { card: kanboardCardMemo[key], memoized: false };
|
||||
}
|
||||
|
||||
function resetKandboarCardMemo() {
|
||||
@ -107,9 +115,9 @@ function resetKandboarCardMemo() {
|
||||
}
|
||||
|
||||
function createKanboardLanes(board: Board, issues: any): KanboardLane[] {
|
||||
const lanes: KanboardLane[] = [];
|
||||
const lanes: KanboardLane[] = [];
|
||||
const rest = new Set<KanboardCard>();
|
||||
|
||||
|
||||
resetKandboarCardMemo();
|
||||
|
||||
board.lanes.forEach((l: BoardLane, i: number) => {
|
||||
@ -128,7 +136,7 @@ function createKanboardLanes(board: Board, issues: any): KanboardLane[] {
|
||||
});
|
||||
|
||||
resetKandboarCardMemo();
|
||||
|
||||
|
||||
return lanes;
|
||||
}
|
||||
|
||||
@ -137,8 +145,8 @@ function createKanboard(board: Board, issues: any) {
|
||||
|
||||
const kanboard = {
|
||||
id: board.id,
|
||||
lanes: createKanboardLanes(board, issues),
|
||||
columns: createKanboardLanes(board, issues),
|
||||
};
|
||||
|
||||
|
||||
return kanboard;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { put, call } from 'redux-saga/effects';
|
||||
import { FETCH_PROJECTS_SUCCESS, FETCH_PROJECTS_FAILURE } from '../actions/projects';
|
||||
import { FETCH_PROJECTS_SUCCESS, FETCH_PROJECTS_FAILURE, FETCH_PROJECT_MILESTONES_FAILURE, FETCH_PROJECT_MILESTONES_SUCCESS } from '../actions/projects';
|
||||
import { gitea } from '../../util/gitea';
|
||||
|
||||
export function* fetchProjectsSaga() {
|
||||
@ -7,10 +7,30 @@ export function* fetchProjectsSaga() {
|
||||
let projects;
|
||||
try {
|
||||
projects = yield call(gitea.fetchUserProjects.bind(gitea))
|
||||
} catch(error) {
|
||||
} catch (error) {
|
||||
yield put({ type: FETCH_PROJECTS_FAILURE, error });
|
||||
return;
|
||||
}
|
||||
|
||||
yield put({ type: FETCH_PROJECTS_SUCCESS, projects });
|
||||
}
|
||||
|
||||
export function* fetchProjectsMilestonesSaga(action: any) {
|
||||
const { projects } = action;
|
||||
let milestones = [];
|
||||
try {
|
||||
for (var i = 0; i < projects.length; i++) {
|
||||
console.log("PROJECT ", projects[i])
|
||||
milestones.push({
|
||||
project: projects[i],
|
||||
milestones: yield call(gitea.fetchMilestones.bind(gitea), projects[i])
|
||||
})
|
||||
}
|
||||
console.log("MILESTONES", milestones)
|
||||
} catch (error) {
|
||||
yield put({ type: FETCH_PROJECT_MILESTONES_FAILURE, error });
|
||||
return;
|
||||
}
|
||||
|
||||
yield put({ type: FETCH_PROJECT_MILESTONES_SUCCESS, milestones });
|
||||
}
|
9
client/src/store/sagas/referer.ts
Normal file
9
client/src/store/sagas/referer.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { hasReferer, getReferer, clearReferer } from '../../util/referer';
|
||||
|
||||
export function* navigateToRefererSaga() {
|
||||
if (!hasReferer()) return;
|
||||
const referer = getReferer();
|
||||
console.log("Redirecting to referer", referer);
|
||||
clearReferer();
|
||||
window.location.hash = referer;
|
||||
}
|
@ -4,15 +4,17 @@ import { FETCH_BOARDS_REQUEST, SAVE_BOARD_REQUEST, DELETE_BOARD_REQUEST } from '
|
||||
import { fetchBoardsSaga, saveBoardSaga, deleteBoardSaga } from './boards';
|
||||
import { FETCH_ISSUES_REQUEST, ADD_LABEL_REQUEST, REMOVE_LABEL_REQUEST, CREATE_ISSUE_REQUEST, CREATE_ISSUE_SUCCESS } from '../actions/issues';
|
||||
import { fetchIssuesSaga, addLabelSaga, removeLabelSaga, createIssueSaga } from './issues';
|
||||
import { FETCH_PROJECTS_REQUEST } from '../actions/projects';
|
||||
import { fetchProjectsSaga } from './projects';
|
||||
import { FETCH_PROJECTS_REQUEST, FETCH_PROJECT_MILESTONES_REQUEST } from '../actions/projects';
|
||||
import { fetchProjectsMilestonesSaga, fetchProjectsSaga } from './projects';
|
||||
import { LOGOUT_REQUEST, LOGOUT_SUCCESS } from '../actions/logout';
|
||||
import { logoutSaga, logoutSuccessSaga } from './logout';
|
||||
import { BUILD_KANBOARD_REQUEST, MOVE_CARD } from '../actions/kanboards';
|
||||
import { buildKanboardSaga, moveCardSaga, refreshKanboardSaga } from './kanboards';
|
||||
import { navigateToRefererSaga } from './referer';
|
||||
|
||||
export function* rootSaga() {
|
||||
yield all([
|
||||
navigateToRefererSaga(),
|
||||
takeEvery(patternFromRegExp(/^.*_FAILURE/), failuresSaga),
|
||||
takeLatest(FETCH_BOARDS_REQUEST, fetchBoardsSaga),
|
||||
takeLatest(BUILD_KANBOARD_REQUEST, buildKanboardSaga),
|
||||
@ -20,6 +22,7 @@ export function* rootSaga() {
|
||||
takeLatest(DELETE_BOARD_REQUEST, deleteBoardSaga),
|
||||
takeLatest(FETCH_ISSUES_REQUEST, fetchIssuesSaga),
|
||||
takeLatest(FETCH_PROJECTS_REQUEST, fetchProjectsSaga),
|
||||
takeLatest(FETCH_PROJECT_MILESTONES_REQUEST, fetchProjectsMilestonesSaga),
|
||||
takeEvery(MOVE_CARD, moveCardSaga),
|
||||
takeEvery(ADD_LABEL_REQUEST, addLabelSaga),
|
||||
takeEvery(REMOVE_LABEL_REQUEST, removeLabelSaga),
|
||||
@ -30,7 +33,7 @@ export function* rootSaga() {
|
||||
]);
|
||||
}
|
||||
|
||||
export function patternFromRegExp(re: any) {
|
||||
export function patternFromRegExp(re: any) {
|
||||
return (action: any) => {
|
||||
return re.test(action.type);
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { createStore, applyMiddleware } from 'redux'
|
||||
import { createStore, applyMiddleware, compose } from 'redux'
|
||||
import createSagaMiddleware from 'redux-saga'
|
||||
import { rootReducer } from './reducers/root'
|
||||
import { rootSaga } from './sagas/root'
|
||||
@ -14,6 +14,8 @@ if (process.env.NODE_ENV !== 'production') {
|
||||
reduxMiddlewares.push(loggerMiddleware);
|
||||
}
|
||||
|
||||
const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
||||
|
||||
// create the saga middleware
|
||||
const sagaMiddleware = createSagaMiddleware()
|
||||
reduxMiddlewares.push(sagaMiddleware);
|
||||
@ -21,7 +23,7 @@ reduxMiddlewares.push(sagaMiddleware);
|
||||
// mount it on the Store
|
||||
export const store = createStore(
|
||||
rootReducer,
|
||||
applyMiddleware(...reduxMiddlewares)
|
||||
composeEnhancers(applyMiddleware(...reduxMiddlewares)),
|
||||
)
|
||||
|
||||
// then run the saga
|
||||
|
@ -2,17 +2,26 @@
|
||||
export class GiteaUnauthorizedError extends Error {
|
||||
constructor(...args: any[]) {
|
||||
super(...args)
|
||||
Object.setPrototypeOf(this, GiteaUnauthorizedError.prototype);
|
||||
}
|
||||
}
|
||||
|
||||
export class GiteaClient {
|
||||
|
||||
fetchIssues(project: any, page = 1) {
|
||||
return fetch(`/gitea/api/v1/repos/${project}/issues?page=${page}`)
|
||||
fetchIssues(project: any, page = "", milestones = "") {
|
||||
return fetch(`/gitea/api/v1/repos/${project}/issues?page=${page}&milestones=${milestones}`)
|
||||
.then(this.assertAuthorization)
|
||||
.then(this.assertOk)
|
||||
.then(res => res.json())
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
fetchMilestones(project: any) {
|
||||
return fetch(`/gitea/api/v1/repos/${project}/milestones`)
|
||||
.then(this.assertAuthorization)
|
||||
.then(this.assertOk)
|
||||
.then(res => res.json())
|
||||
;
|
||||
}
|
||||
|
||||
fetchUserProjects() {
|
||||
@ -20,7 +29,7 @@ export class GiteaClient {
|
||||
.then(this.assertAuthorization)
|
||||
.then(this.assertOk)
|
||||
.then(res => res.json())
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
addIssueLabel(project: any, issueNumber: any, labelID: any) {
|
||||
@ -31,9 +40,9 @@ export class GiteaClient {
|
||||
},
|
||||
body: JSON.stringify({ labels: [labelID] }),
|
||||
})
|
||||
.then(this.assertAuthorization)
|
||||
.then(this.assertOk)
|
||||
.then(res => res.json())
|
||||
.then(this.assertAuthorization)
|
||||
.then(this.assertOk)
|
||||
.then(res => res.json())
|
||||
}
|
||||
|
||||
fetchProjectLabels(project: any) {
|
||||
@ -41,15 +50,15 @@ export class GiteaClient {
|
||||
.then(this.assertAuthorization)
|
||||
.then(this.assertOk)
|
||||
.then(res => res.json())
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
removeIssueLabel(project: any, issueNumber: any, labelID: any) {
|
||||
return fetch(`/gitea/api/v1/repos/${project}/issues/${issueNumber}/labels/${labelID}`, {
|
||||
method: 'DELETE'
|
||||
})
|
||||
.then(this.assertAuthorization)
|
||||
.then(this.assertOk)
|
||||
.then(this.assertAuthorization)
|
||||
.then(this.assertOk)
|
||||
}
|
||||
|
||||
createIssue(project: any, title: any, body: any, labelID: any) {
|
||||
@ -61,12 +70,12 @@ export class GiteaClient {
|
||||
body: JSON.stringify({
|
||||
title,
|
||||
body,
|
||||
labels: [labelID],
|
||||
labels: labelID ? [labelID] : undefined,
|
||||
}),
|
||||
})
|
||||
.then(this.assertAuthorization)
|
||||
.then(this.assertOk)
|
||||
.then(res => res.json())
|
||||
.then(this.assertAuthorization)
|
||||
.then(this.assertOk)
|
||||
.then(res => res.json())
|
||||
}
|
||||
|
||||
assertOk(res: any) {
|
||||
|
19
client/src/util/referer.ts
Normal file
19
client/src/util/referer.ts
Normal file
@ -0,0 +1,19 @@
|
||||
const localStorage = window.localStorage;
|
||||
const refererKey = 'referer';
|
||||
|
||||
export function getReferer() {
|
||||
return localStorage.getItem(refererKey);
|
||||
}
|
||||
|
||||
export function saveReferer() {
|
||||
console.log("Saving referer", window.location.hash);
|
||||
localStorage.setItem(refererKey, window.location.hash);
|
||||
}
|
||||
|
||||
export function hasReferer() {
|
||||
return !!getReferer();
|
||||
}
|
||||
|
||||
export function clearReferer() {
|
||||
localStorage.removeItem(refererKey);
|
||||
}
|
@ -19,7 +19,7 @@ module.exports = {
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.scss$/,
|
||||
test: /\.s(a|c)ss$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ func getServiceContainer(conf *config.Config) (*service.Container, error) {
|
||||
|
||||
ctn.Provide(
|
||||
session.ServiceName,
|
||||
gorilla.ServiceProvider("gitea-kan", cookieStore),
|
||||
gorilla.ServiceProvider("gengitkan", cookieStore),
|
||||
)
|
||||
|
||||
// Create and expose config service provider
|
||||
|
6
go.mod
6
go.mod
@ -4,24 +4,20 @@ go 1.13
|
||||
|
||||
require (
|
||||
github.com/asdine/storm v2.1.2+incompatible
|
||||
github.com/cortesi/modd v0.0.0-20210222043654-cbdcc23af7d5 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/go-chi/chi v4.0.2+incompatible
|
||||
github.com/google/uuid v1.1.1 // indirect
|
||||
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect
|
||||
github.com/gorilla/sessions v1.2.0
|
||||
github.com/kr/pretty v0.1.0 // indirect
|
||||
github.com/pborman/uuid v1.2.0
|
||||
github.com/pkg/errors v0.8.1
|
||||
github.com/smartystreets/assertions v1.0.1 // indirect
|
||||
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 // indirect
|
||||
github.com/stretchr/testify v1.4.0 // indirect
|
||||
github.com/zserge/lorca v0.1.8 // indirect
|
||||
gitlab.com/wpetit/goweb v0.0.0-20190728111123-bbcb57177273
|
||||
go.etcd.io/bbolt v1.3.3
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
||||
golang.org/x/text v0.3.2 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
||||
gopkg.in/ini.v1 v1.49.0
|
||||
gopkg.in/yaml.v2 v2.2.5 // indirect
|
||||
)
|
||||
|
62
go.sum
62
go.sum
@ -1,15 +1,33 @@
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4=
|
||||
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
|
||||
github.com/asdine/storm v2.1.2+incompatible h1:dczuIkyqwY2LrtXPz8ixMrU/OFgZp71kbKTHGrXYt/Q=
|
||||
github.com/asdine/storm v2.1.2+incompatible/go.mod h1:RarYDc9hq1UPLImuiXK3BIWPJLdIygvV3PsInK0FbVQ=
|
||||
github.com/bmatcuk/doublestar v1.3.4 h1:gPypJ5xD31uhX6Tf54sDPUOBXTqKH4c9aPY66CyQrS0=
|
||||
github.com/bmatcuk/doublestar v1.3.4/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
|
||||
github.com/cortesi/modd v0.0.0-20210222043654-cbdcc23af7d5 h1:R2McxbAMq4aEHYUzQ8DGxWPXHSr33LdWS1C2qWCS554=
|
||||
github.com/cortesi/modd v0.0.0-20210222043654-cbdcc23af7d5/go.mod h1:5XXIj61uad0c9FWBHCA1M+pP+xvO0+/OI10xL4Hg68w=
|
||||
github.com/cortesi/moddwatch v0.0.0-20210222043437-a6aaad86a36e h1:vNbhR09qtq9ELJgvhAWng4zl/4CVTPBPVev3R8MlUYc=
|
||||
github.com/cortesi/moddwatch v0.0.0-20210222043437-a6aaad86a36e/go.mod h1:MUkYRZrwFTHATqCI5tDJRPqmBt9xf3q4+Avfut7kCCE=
|
||||
github.com/cortesi/termlog v0.0.0-20210222042314-a1eec763abec h1:v7D8uHsIKsyjfyhhNdY4qivqN558Ejiq+CDXiUljZ+4=
|
||||
github.com/cortesi/termlog v0.0.0-20210222042314-a1eec763abec/go.mod h1:10Fm2kasJmcKf1FSMQGSWb976sfR29hejNtfS9AydB4=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
|
||||
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||
github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs=
|
||||
github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
|
||||
github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM=
|
||||
github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY=
|
||||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
@ -21,22 +39,34 @@ github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYb
|
||||
github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw=
|
||||
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
|
||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
|
||||
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7/go.mod h1:zO8QMzTeZd5cpnIkz/Gn6iK0jDfGicM1nynOkkPIl28=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rjeczalik/notify v0.0.0-20181126183243-629144ba06a1 h1:FLWDC+iIP9BWgYKvWKKtOUZux35LIQNAuIzp/63RQJU=
|
||||
github.com/rjeczalik/notify v0.0.0-20181126183243-629144ba06a1/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM=
|
||||
github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
|
||||
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/zserge/lorca v0.1.8 h1:gZwyvesmaoGCwxF5NssI6pdydXkCVHOoHw2nks/PBRs=
|
||||
github.com/zserge/lorca v0.1.8/go.mod h1:gTrVdXKyWxNhc8aUb1Uu3s0mY343arR1T6jUtxmBxR8=
|
||||
gitlab.com/wpetit/goweb v0.0.0-20190728111123-bbcb57177273 h1:YtMGT0pEGTQ5MAglg6rvu8pQVQJEtskoeEw+csUqf2o=
|
||||
@ -44,31 +74,63 @@ gitlab.com/wpetit/goweb v0.0.0-20190728111123-bbcb57177273/go.mod h1:5Y/eVplFvds
|
||||
go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g=
|
||||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d h1:1aflnvSoWWLI2k/dMUAl5lvU1YO4Mb4hz0gh+1rjcxU=
|
||||
golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201029080932-201ba4db2418/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43 h1:SgQ6LNaYJU0JIuEHv9+s6EbhSCwYeAf5Yvj6lpYlqAE=
|
||||
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/term v0.0.0-20191110171634-ad39bd3f0407/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
|
||||
gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
|
||||
gopkg.in/ini.v1 v1.49.0 h1:MW0aLMiezbm/Ray0gJJ+nQFE2uOC9EpK2p5zPN3NqpM=
|
||||
gopkg.in/ini.v1 v1.49.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
mvdan.cc/editorconfig v0.1.1-0.20200121172147-e40951bde157/go.mod h1:Ge4atmRUYqueGppvJ7JNrtqpqokoJEFxYbP0Z+WeKS8=
|
||||
mvdan.cc/sh/v3 v3.2.2 h1:UpH3jtOUEXBWXZg35bnRukUjsB6UR+nNhhXCi2dGKOs=
|
||||
mvdan.cc/sh/v3 v3.2.2/go.mod h1:fPQmabBpREM/XQ9YXSU5ZFZ/Sm+PmKP9/vkFHgYKJEI=
|
||||
|
Reference in New Issue
Block a user