Compare commits
2 Commits
pkg/dev/ub
...
develop
Author | SHA1 | Date | |
---|---|---|---|
0af54a0d52 | |||
d8dcf636ea |
@ -3,10 +3,18 @@ import { FETCH_PROJECTS_SUCCESS, FETCH_PROJECTS_FAILURE } from '../actions/proje
|
|||||||
import { gitea } from '../../util/gitea';
|
import { gitea } from '../../util/gitea';
|
||||||
|
|
||||||
export function* fetchProjectsSaga() {
|
export function* fetchProjectsSaga() {
|
||||||
|
let projects = [];
|
||||||
let projects;
|
|
||||||
try {
|
try {
|
||||||
projects = yield call(gitea.fetchUserProjects.bind(gitea))
|
let page = 1;
|
||||||
|
while(true) {
|
||||||
|
let pageProjects = yield call(gitea.fetchUserProjects.bind(gitea), page);
|
||||||
|
if (pageProjects.length === 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
projects.push(...pageProjects);
|
||||||
|
page++;
|
||||||
|
}
|
||||||
|
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
yield put({ type: FETCH_PROJECTS_FAILURE, error });
|
yield put({ type: FETCH_PROJECTS_FAILURE, error });
|
||||||
return;
|
return;
|
||||||
|
@ -16,8 +16,8 @@ export class GiteaClient {
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchUserProjects() {
|
fetchUserProjects(page = 1) {
|
||||||
return fetch(`/gitea/api/v1/user/repos`)
|
return fetch(`/gitea/api/v1/user/repos?page=${page}`)
|
||||||
.then(this.assertAuthorization)
|
.then(this.assertAuthorization)
|
||||||
.then(this.assertOk)
|
.then(this.assertOk)
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
|
1
debian/compat
vendored
1
debian/compat
vendored
@ -1 +0,0 @@
|
|||||||
9
|
|
14
debian/control
vendored
14
debian/control
vendored
@ -1,14 +0,0 @@
|
|||||||
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
1
debian/gengitkan.dirs
vendored
@ -1 +0,0 @@
|
|||||||
var/lib/gengitkan
|
|
13
debian/gengitkan.service
vendored
13
debian/gengitkan.service
vendored
@ -1,13 +0,0 @@
|
|||||||
[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
54
debian/rules
vendored
@ -1,54 +0,0 @@
|
|||||||
#!/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
1
debian/source/format
vendored
@ -1 +0,0 @@
|
|||||||
3.0 (native)
|
|
Reference in New Issue
Block a user