Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing validation steps in KitspaceSignUp #40

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 0 additions & 94 deletions .github/ISSUE_TEMPLATE/bug-report.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE/feature-request.yaml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/ISSUE_TEMPLATE/ui.bug-report.yaml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/sync-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Sync fork
# syncs our main branch with upstream main

on:
# runs every monday at 6:21 UTC+0
schedule:
- cron: '21 6 * * MON'
# allow triggers via button click
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-20.04

steps:
- uses: tgymnich/[email protected]
with:
pr_title: Fork updates from go-gitea/gitea main
owner: go-gitea
base: main
head: main
auto_approve: false
auto_merge: true
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Build stage
FROM golang:1.18-alpine3.15 AS build-env
FROM golang:1.17-alpine3.15 AS build-env

ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
Expand Down
66 changes: 66 additions & 0 deletions Dockerfile.gitea.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
FROM golang:1.17-alpine3.15

ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}

ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS

#Build & runtime deps
RUN apk --no-cache add \
build-base \
git \
nodejs \
npm \
bash \
ca-certificates \
curl \
gettext \
git \
linux-pam \
openssh \
s6 \
sqlite \
su-exec \
gnupg


#Setup repo
COPY . /go/src/code.gitea.io/gitea
WORKDIR /go/src/code.gitea.io/gitea

RUN npm install --no-save
RUN make build

# Begin env-to-ini build
RUN go build contrib/environment-to-ini/environment-to-ini.go

EXPOSE 22 3000

RUN addgroup \
-S -g 1000 \
git && \
adduser \
-S -H -D \
-h /data/git \
-s /bin/bash \
-u 1000 \
-G git \
git && \
echo "git:*" | chpasswd -e

ENV USER git
ENV GITEA_CUSTOM /data/gitea

VOLUME ["/data"]

ENTRYPOINT ["/usr/bin/entrypoint"]
CMD ["/bin/s6-svscan", "/etc/s6"]

COPY docker/root /
RUN mkdir -p /app/gitea
RUN cp /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
RUN cp /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
RUN chmod 755 /usr/bin/entrypoint /app/gitea/gitea /usr/local/bin/gitea /usr/local/bin/environment-to-ini
RUN chmod 755 /etc/s6/gitea/* /etc/s6/openssh/* /etc/s6/.s6-svscan/*
8 changes: 6 additions & 2 deletions routers/api/v1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,10 @@ func Routes(sessioner func(http.Handler) http.Handler) *web.Route {

m.Get("/issues/search", repo.SearchIssues)

m.Post("/migrate", reqToken(), bind(api.MigrateRepoOptions{}), repo.Migrate)
m.Group("/migrate", func() {
m.Post("", reqToken(), bind(api.MigrateRepoOptions{}), repo.Migrate)
m.Get("/status", repo.GetMigratingTask)
})

m.Group("/{username}/{reponame}", func() {
m.Combo("").Get(reqAnyRepoReader(), repo.Get).
Expand Down Expand Up @@ -803,9 +806,10 @@ func Routes(sessioner func(http.Handler) http.Handler) *web.Route {
m.Post("/tests", context.RepoRefForAPI, repo.TestHook)
})
}, reqToken(), reqAdmin(), reqWebhooksEnabled())
m.Get("/collaborators/{collaborator}", reqAnyRepoReader(), repo.IsCollaborator)
m.Group("/collaborators", func() {
m.Get("", reqAnyRepoReader(), repo.ListCollaborators)
m.Combo("/{collaborator}").Get(reqAnyRepoReader(), repo.IsCollaborator).
m.Combo("/{collaborator}").
Put(reqAdmin(), bind(api.AddCollaboratorOption{}), repo.AddCollaborator).
Delete(reqAdmin(), repo.DeleteCollaborator)
}, reqToken())
Expand Down
Loading