Skip to content

Commit b0f2f14

Browse files
authored
Merge branch 'go-gorm:master' into master
2 parents d8ad9b1 + 5c4016d commit b0f2f14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+3171
-781
lines changed

.github/workflows/invalid_question.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,26 @@ on:
33
schedule:
44
- cron: "*/10 * * * *"
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
stale:
11+
permissions:
12+
issues: write # for actions/stale to close stale issues
13+
pull-requests: write # for actions/stale to close stale PRs
814
runs-on: ubuntu-latest
915
env:
1016
ACTIONS_STEP_DEBUG: true
1117
steps:
1218
- name: Close Stale Issues
13-
uses: actions/stale@v4
19+
uses: actions/stale@v5
1420
with:
1521
repo-token: ${{ secrets.GITHUB_TOKEN }}
16-
stale-issue-message: "This issue has been marked as invalid question, please give more information by following the `Question` template, if you believe there is a bug of GORM, please create a pull request that could reproduce the issue on [https://github.com/go-gorm/playground](https://github.com/go-gorm/playground), the issue will be closed in 2 days if no further activity occurs. most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ [Search Before Asking](https://stackoverflow.com/help/how-to-ask) ✨"
22+
stale-issue-message: "This issue has been marked as invalid question, please give more information by following the `Question` template, if you believe there is a bug of GORM, please create a pull request that could reproduce the issue on [https://github.com/go-gorm/playground](https://github.com/go-gorm/playground), the issue will be closed in 30 days if no further activity occurs. most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ [Search Before Asking](https://stackoverflow.com/help/how-to-ask) ✨"
1723
stale-issue-label: "status:stale"
1824
days-before-stale: 0
19-
days-before-close: 2
25+
days-before-close: 30
2026
remove-stale-when-updated: true
2127
only-labels: "type:invalid question"
2228

.github/workflows/labeler.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Label issues and pull requests
1212
steps:
1313
- name: check out
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1515

1616
- name: labeler
1717
uses: jinzhu/super-labeler-action@develop

.github/workflows/missing_playground.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,25 @@ on:
33
schedule:
44
- cron: "*/10 * * * *"
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
stale:
11+
permissions:
12+
issues: write # for actions/stale to close stale issues
13+
pull-requests: write # for actions/stale to close stale PRs
814
runs-on: ubuntu-latest
915
env:
1016
ACTIONS_STEP_DEBUG: true
1117
steps:
1218
- name: Close Stale Issues
13-
uses: actions/stale@v4
19+
uses: actions/stale@v5
1420
with:
1521
repo-token: ${{ secrets.GITHUB_TOKEN }}
16-
stale-issue-message: "The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout [https://github.com/go-gorm/playground](https://github.com/go-gorm/playground) for details. it will be closed in 2 days if no further activity occurs. if you are asking question, please use the `Question` template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ [Search Before Asking](https://stackoverflow.com/help/how-to-ask) ✨"
22+
stale-issue-message: "The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout [https://github.com/go-gorm/playground](https://github.com/go-gorm/playground) for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the `Question` template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ [Search Before Asking](https://stackoverflow.com/help/how-to-ask) ✨"
1723
stale-issue-label: "status:stale"
1824
days-before-stale: 0
19-
days-before-close: 2
25+
days-before-close: 30
2026
remove-stale-when-updated: true
2127
only-labels: "type:missing reproduction steps"

.github/workflows/reviewdog.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Check out code into the Go module directory
9-
uses: actions/checkout@v2
9+
uses: actions/checkout@v3
1010
- name: golangci-lint
1111
uses: reviewdog/action-golangci-lint@v2
1212

.github/workflows/stale.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,25 @@ on:
33
schedule:
44
- cron: "0 2 * * *"
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
stale:
11+
permissions:
12+
issues: write # for actions/stale to close stale issues
13+
pull-requests: write # for actions/stale to close stale PRs
814
runs-on: ubuntu-latest
915
env:
1016
ACTIONS_STEP_DEBUG: true
1117
steps:
1218
- name: Close Stale Issues
13-
uses: actions/stale@v4
19+
uses: actions/stale@v5
1420
with:
1521
repo-token: ${{ secrets.GITHUB_TOKEN }}
16-
stale-issue-message: "This issue has been automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days"
17-
days-before-stale: 60
18-
days-before-close: 30
22+
stale-issue-message: "This issue has been automatically marked as stale because it has been open 360 days with no activity. Remove stale label or comment or this will be closed in 180 days"
23+
days-before-stale: 360
24+
days-before-close: 180
1925
stale-issue-label: "status:stale"
2026
exempt-issue-labels: 'type:feature,type:with reproduction steps,type:has pull request'
2127
stale-pr-label: 'status:stale'

.github/workflows/tests.yml

+19-16
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,29 @@ on:
88
branches-ignore:
99
- 'gh-pages'
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
# Label of the container job
1316
sqlite:
1417
strategy:
1518
matrix:
16-
go: ['1.17', '1.16']
19+
go: ['1.18', '1.17', '1.16']
1720
platform: [ubuntu-latest] # can not run in windows OS
1821
runs-on: ${{ matrix.platform }}
1922

2023
steps:
2124
- name: Set up Go 1.x
22-
uses: actions/setup-go@v2
25+
uses: actions/setup-go@v3
2326
with:
2427
go-version: ${{ matrix.go }}
2528

2629
- name: Check out code into the Go module directory
27-
uses: actions/checkout@v2
30+
uses: actions/checkout@v3
2831

2932
- name: go mod package cache
30-
uses: actions/cache@v2
33+
uses: actions/cache@v3
3134
with:
3235
path: ~/go/pkg/mod
3336
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
@@ -39,7 +42,7 @@ jobs:
3942
strategy:
4043
matrix:
4144
dbversion: ['mysql:latest', 'mysql:5.7', 'mariadb:latest']
42-
go: ['1.17', '1.16']
45+
go: ['1.18', '1.17', '1.16']
4346
platform: [ubuntu-latest]
4447
runs-on: ${{ matrix.platform }}
4548

@@ -62,16 +65,16 @@ jobs:
6265
6366
steps:
6467
- name: Set up Go 1.x
65-
uses: actions/setup-go@v2
68+
uses: actions/setup-go@v3
6669
with:
6770
go-version: ${{ matrix.go }}
6871

6972
- name: Check out code into the Go module directory
70-
uses: actions/checkout@v2
73+
uses: actions/checkout@v3
7174

7275

7376
- name: go mod package cache
74-
uses: actions/cache@v2
77+
uses: actions/cache@v3
7578
with:
7679
path: ~/go/pkg/mod
7780
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
@@ -83,7 +86,7 @@ jobs:
8386
strategy:
8487
matrix:
8588
dbversion: ['postgres:latest', 'postgres:13', 'postgres:12', 'postgres:11', 'postgres:10']
86-
go: ['1.17', '1.16']
89+
go: ['1.18', '1.17', '1.16']
8790
platform: [ubuntu-latest] # can not run in macOS and Windows
8891
runs-on: ${{ matrix.platform }}
8992

@@ -106,15 +109,15 @@ jobs:
106109
107110
steps:
108111
- name: Set up Go 1.x
109-
uses: actions/setup-go@v2
112+
uses: actions/setup-go@v3
110113
with:
111114
go-version: ${{ matrix.go }}
112115

113116
- name: Check out code into the Go module directory
114-
uses: actions/checkout@v2
117+
uses: actions/checkout@v3
115118

116119
- name: go mod package cache
117-
uses: actions/cache@v2
120+
uses: actions/cache@v3
118121
with:
119122
path: ~/go/pkg/mod
120123
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
@@ -125,7 +128,7 @@ jobs:
125128
sqlserver:
126129
strategy:
127130
matrix:
128-
go: ['1.17', '1.16']
131+
go: ['1.18', '1.17', '1.16']
129132
platform: [ubuntu-latest] # can not run test in macOS and windows
130133
runs-on: ${{ matrix.platform }}
131134

@@ -149,15 +152,15 @@ jobs:
149152
150153
steps:
151154
- name: Set up Go 1.x
152-
uses: actions/setup-go@v2
155+
uses: actions/setup-go@v3
153156
with:
154157
go-version: ${{ matrix.go }}
155158

156159
- name: Check out code into the Go module directory
157-
uses: actions/checkout@v2
160+
uses: actions/checkout@v3
158161

159162
- name: go mod package cache
160-
uses: actions/cache@v2
163+
uses: actions/cache@v3
161164
with:
162165
path: ~/go/pkg/mod
163166
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ documents
33
coverage.txt
44
_book
55
.idea
6+
vendor

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The fantastic ORM library for Golang, aims to be developer friendly.
3030
## Getting Started
3131

3232
* GORM Guides [https://gorm.io](https://gorm.io)
33+
* GORM Gen [gorm/gen](https://github.com/go-gorm/gen#gormgen)
3334

3435
## Contributing
3536

0 commit comments

Comments
 (0)