Compare commits

..

20 Commits

Author SHA1 Message Date
164377ec08 Merge branch 'develop' into dist/ubuntu/bionic/develop 2020-04-30 17:28:42 +02:00
9cdacf70a0 Merge branch 'develop' into dist/ubuntu/bionic/develop 2020-04-30 17:09:36 +02:00
fb37bb0e98 Renommage du projet en gengitkan 2020-04-30 16:10:57 +02:00
59dcb4c18a Merge branch 'develop' into dist/ubuntu/bionic/develop 2020-04-30 15:46:44 +02:00
61ef77cf16 Merge branch 'develop' into dist/ubuntu/bionic/develop 2020-01-13 14:18:30 +01:00
acde7436da Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-13 15:50:00 +01:00
b3d458ebac Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-13 14:21:32 +01:00
5284633e7f Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-13 13:32:10 +01:00
5c77f22c26 Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-06 17:15:38 +01:00
204d6869ec Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-06 10:02:46 +01:00
35683a4584 Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-05 22:46:30 +01:00
64dd215038 Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-05 22:37:35 +01:00
d8192e6953 Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-05 17:09:25 +01:00
4d3175a25e Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-05 16:15:49 +01:00
ca7b8aac47 Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-05 14:44:48 +01:00
971bf25f16 Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-05 13:57:27 +01:00
a2ab012c5f Create /var/lib/gitea-kan dir 2019-12-05 13:20:19 +01:00
fb815c4d83 Define gitea-kan configuration env vars 2019-12-05 13:19:54 +01:00
88a0a5bebe Merge branch 'develop' into dist/ubuntu/bionic/develop 2019-12-05 13:12:10 +01:00
f54b579ae3 Add Debian packaging recipe 2019-12-05 13:10:02 +01:00
16 changed files with 90 additions and 42 deletions

View File

@ -9,7 +9,6 @@
### 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
```

View File

@ -1,11 +1,10 @@
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) {
if (action.error instanceof GiteaUnauthorizedError) {
saveReferer();
const err = action.error;
if (err instanceof GiteaUnauthorizedError) {
yield put(logout());
}
}

View File

@ -18,7 +18,7 @@ export function* fetchIssuesSaga(action: any) {
if (pageIssues.length === 0) {
break;
}
issues.push(...pageIssues.filter(issue => issue.pull_request === null));
issues.push(...pageIssues);
page++;
}

View File

@ -1,9 +0,0 @@
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;
}

View File

@ -10,11 +10,9 @@ 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),

View File

@ -1,4 +1,4 @@
import { createStore, applyMiddleware, compose } from 'redux'
import { createStore, applyMiddleware } from 'redux'
import createSagaMiddleware from 'redux-saga'
import { rootReducer } from './reducers/root'
import { rootSaga } from './sagas/root'
@ -14,8 +14,6 @@ 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);
@ -23,7 +21,7 @@ reduxMiddlewares.push(sagaMiddleware);
// mount it on the Store
export const store = createStore(
rootReducer,
composeEnhancers(applyMiddleware(...reduxMiddlewares)),
applyMiddleware(...reduxMiddlewares)
)
// then run the saga

View File

@ -2,7 +2,6 @@
export class GiteaUnauthorizedError extends Error {
constructor(...args: any[]) {
super(...args)
Object.setPrototypeOf(this, GiteaUnauthorizedError.prototype);
}
}

View File

@ -1,19 +0,0 @@
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);
}

View File

@ -28,7 +28,7 @@ func getServiceContainer(conf *config.Config) (*service.Container, error) {
ctn.Provide(
session.ServiceName,
gorilla.ServiceProvider("gengitkan", cookieStore),
gorilla.ServiceProvider("gitea-kan", cookieStore),
)
// Create and expose config service provider

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

14
debian/control vendored Normal file
View File

@ -0,0 +1,14 @@
Source: gengitkan
Section: unknown
Priority: optional
Maintainer: William Petit <wpetit@cadoles.com>
Build-Depends: debhelper (>= 8.0.0), wget, ca-certificates, tar
Standards-Version: 3.9.4
Homepage: http://forge.cadoles.com/wpetit/gengitkan
Vcs-Git: http://forge.cadoles.com/wpetit/gengitkan.git
Vcs-Browser: http://forge.cadoles.com/wpetit/gengitkan
Package: gengitkan
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Application type "Kanboard" connectée à Gitea

1
debian/gengitkan.dirs vendored Normal file
View File

@ -0,0 +1 @@
var/lib/gengitkan

13
debian/gengitkan.service vendored Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description=Application type "Kanboard" connectée à Gitea
After=network-online.target
[Service]
Type=simple
Environment=GENGITKAN_HTTP_PUBDIR=/usr/share/gengitkan/public
Environment=GENGITKAN_DATA_DBPATH=/var/lib/gengitkan/data.db
ExecStart=/usr/bin/gengitkan -workdir /usr/share/gengitkan -config /etc/gengitkan/server.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target

54
debian/rules vendored Normal file
View File

@ -0,0 +1,54 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
GO_VERSION := 1.13.5
OS := linux
ARCH := amd64
GOPATH=$(HOME)/go
ifeq (, $(shell which go 2>/dev/null))
override_dh_auto_build: install-go
endif
ifeq (, $(shell which node 2>/dev/null))
override_dh_auto_build: install-nodejs
endif
%:
dh $@ --with systemd
override_dh_auto_build: $(GOPATH)
cd client && npm install
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" go mod vendor
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" ARCH_TARGETS=$(ARCH) make release
$(GOPATH):
mkdir -p $(GOPATH)
install-go:
wget https://dl.google.com/go/go$(GO_VERSION).$(OS)-$(ARCH).tar.gz
tar -C /usr/local -xzf go$(GO_VERSION).$(OS)-$(ARCH).tar.gz
install-nodejs:
wget -O- https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
override_dh_auto_install:
mkdir -p debian/gengitkan/usr/share/gengitkan
mkdir -p debian/gengitkan/etc/gengitkan
mkdir -p debian/gengitkan/usr/bin
cp -r release/server-$(OS)-$(ARCH)/* debian/gengitkan/usr/share/gengitkan/
mv debian/gengitkan/usr/share/gengitkan/bin/server debian/gengitkan/usr/bin/gengitkan
mv debian/gengitkan/usr/share/gengitkan/server.conf debian/gengitkan/etc/gengitkan/server.conf
install -d debian/gengitkan
override_dh_strip:
override_dh_auto_test:

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)

View File

@ -20,7 +20,6 @@ type HTTPConfig struct {
}
type GiteaConfig struct {
BaseURL string
ClientID string
ClientSecret string
RedirectURL string