Skip to content

Commit

Permalink
Merge branch 'main' into feature/actions_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GiteaBot committed May 5, 2023
2 parents 6a1ccc5 + b8c19e7 commit cf433f7
Show file tree
Hide file tree
Showing 32 changed files with 878 additions and 345 deletions.
8 changes: 4 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ steps:
- git fetch --tags --force

- name: deps-frontend
image: node:18
image: node:20
pull: always
commands:
- make deps-frontend
Expand All @@ -51,7 +51,7 @@ steps:
image: techknowlogick/xgo:go-1.20.x
pull: always
commands:
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
# Upgrade to node 20 once https://github.com/techknowlogick/xgo/issues/163 is resolved
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
- export PATH=$PATH:$GOPATH/bin
- make release
Expand Down Expand Up @@ -161,7 +161,7 @@ steps:
- git fetch --tags --force

- name: deps-frontend
image: node:18
image: node:20
pull: always
commands:
- make deps-frontend
Expand All @@ -179,7 +179,7 @@ steps:
image: techknowlogick/xgo:go-1.20.x
pull: always
commands:
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
# Upgrade to node 20 once https://github.com/techknowlogick/xgo/issues/163 is resolved
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
- export PATH=$PATH:$GOPATH/bin
- make release
Expand Down
23 changes: 0 additions & 23 deletions .github/lock.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Lock Threads'

on:
schedule:
- cron: '0 0 * * *' # Run once a day
workflow_dispatch:

permissions:
issues: write
pull-requests: write

concurrency:
group: lock

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v4
with:
issue-inactive-days: 45
8 changes: 6 additions & 2 deletions .github/workflows/pull-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: "Pull: Compliance Tests"

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint_basic:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -79,7 +83,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- name: deps-frontend
run: make deps-frontend
- name: lint frontend
Expand All @@ -100,7 +104,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- name: deps-backend
run: make deps-backend deps-tools
- name: deps-frontend
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pull-compliance_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ on:
- "docs/**"
- "*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
compliance-docs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- name: install dependencies
run: make deps-frontend
- name: lint markdown
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pull-db_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: "Pull: Database Tests"

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
# PostgreSQL Tests
db_pgsql_test:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pull-docker_dryrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: "Pull: Docker Dry Run"

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
docker_dryrun:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pull-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: "Pull: E2E Tests"

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
e2e_tests:
runs-on: ubuntu-latest
Expand All @@ -15,7 +19,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- name: build
run: make deps-frontend frontend deps-backend
- name: Install playwright browsers
Expand Down
54 changes: 52 additions & 2 deletions assets/go-licenses.json

Large diffs are not rendered by default.

30 changes: 29 additions & 1 deletion build/generate-go-licenses.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,40 @@ func main() {

base, out := os.Args[1], os.Args[2]

// Add ext for excluded files because license_test.go will be included for some reason.
// And there are more files that should be excluded, check with:
//
// go run github.com/google/go-licenses@v1.6.0 save . --force --save_path=.go-licenses 2>/dev/null
// find .go-licenses -type f | while read FILE; do echo "${$(basename $FILE)##*.}"; done | sort -u
// AUTHORS
// COPYING
// LICENSE
// Makefile
// NOTICE
// gitignore
// go
// md
// mod
// sum
// toml
// txt
// yml
//
// It could be removed once we have a better regex.
excludedExt := map[string]bool{
".gitignore": true,
".go": true,
".mod": true,
".sum": true,
".toml": true,
".yml": true,
}
var paths []string
err := filepath.WalkDir(base, func(path string, entry fs.DirEntry, err error) error {
if err != nil {
return err
}
if entry.IsDir() || !licenseRe.MatchString(entry.Name()) {
if entry.IsDir() || !licenseRe.MatchString(entry.Name()) || excludedExt[filepath.Ext(entry.Name())] {
return nil
}
paths = append(paths, path)
Expand Down
2 changes: 1 addition & 1 deletion docs/content/doc/administration/command-line.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Admin operations:
- `--synchronize-users`: Enable user synchronization.
- `--page-size value`: Search page size.
- Examples:
- `gitea admin auth add-ldap --name ldap --security-protocol unencrypted --host mydomain.org --port 389 --user-search-base "ou=Users,dc=mydomain,dc=org" --user-filter "(&(objectClass=posixAccount)(uid=%s))" --email-attribute mail`
- `gitea admin auth add-ldap --name ldap --security-protocol unencrypted --host mydomain.org --port 389 --user-search-base "ou=Users,dc=mydomain,dc=org" --user-filter "(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" --email-attribute mail`
- `update-ldap`: Update existing LDAP (via Bind DN) authentication source
- Options:
- `--id value`: ID of authentication source. Required.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/doc/development/api-usage.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ curl -v "http://localhost/api/v1/repos/search?limit=1"
< x-total-count: 5252
```
## API Guide:
## API Guide
API Reference guide is auto-generated by swagger and available on:
`https://gitea.your.host/api/swagger`
Expand Down
10 changes: 5 additions & 5 deletions docs/content/doc/usage/authentication.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ Adds the following fields:

- User Filter **(required)**
- An LDAP filter declaring how to find the user record that is attempting to
authenticate. The `%s` matching parameter will be substituted with login
authenticate. The `%[1]s` matching parameter will be substituted with login
name given on sign-in form.
- Example: `(&(objectClass=posixAccount)(uid=%s))`
- Example: `(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))`
- Example for Microsoft Active Directory (AD): `(&(objectCategory=Person)(memberOf=CN=user-group,OU=example,DC=example,DC=org)(sAMAccountName=%s)(!(UserAccountControl:1.2.840.113556.1.4.803:=2)))`
- To substitute more than once, `%[1]s` should be used instead, e.g. when
matching supplied login name against multiple attributes such as user
Expand Down Expand Up @@ -137,11 +137,11 @@ Adds the following fields:
- Example: `ou=Users,dc=mydomain,dc=com`

- User Filter **(required)**
- An LDAP filter declaring when a user should be allowed to log in. The `%s`
- An LDAP filter declaring when a user should be allowed to log in. The `%[1]s`
matching parameter will be substituted with login name given on sign-in
form.
- Example: `(&(objectClass=posixAccount)(cn=%s))`
- Example: `(&(objectClass=posixAccount)(uid=%s))`
- Example: `(&(objectClass=posixAccount)(|(cn=%[1]s)(mail=%[1]s)))`
- Example: `(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))`

### Verify group membership in LDAP

Expand Down
Loading

0 comments on commit cf433f7

Please sign in to comment.