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

[pull] master from go-gorm:master #12

Open
wants to merge 1,197 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1197 commits
Select commit Hold shift + click to select a range
62fdc2b
Fix serializer with empty string
jinzhu Jul 11, 2022
08f6d06
Fix select with quoted column name
jinzhu Jul 13, 2022
a706384
Fix select with uppercase column name
jinzhu Jul 13, 2022
cae30e9
Fix select with association column
jinzhu Jul 13, 2022
3262daf
Fix select with association column
jinzhu Jul 13, 2022
4d40e34
Update select tests
jinzhu Jul 14, 2022
099813b
Adjust ToStringKey use unpack params, fix pass []any as any in varia…
alingse Jul 14, 2022
2ba599e
fix empty QueryClauses in association (#5502) (#5503)
goxiaoy Jul 15, 2022
7572009
Create a new db in FindInBatches
jinzhu Jul 18, 2022
bab3cd1
fix bad logging performance of bulk create (#5520) (#5521)
zxdvd Jul 18, 2022
06e174e
fix: embedded default value (#5540)
a631807682 Jul 25, 2022
3c6eb14
Fixed some typos in the code comment
Minjerous Jul 26, 2022
6e03b97
fix: empty serilizer err #5524 (#5525)
philhuan Jul 27, 2022
f223279
chore: fix gorm tag (#5577)
a631807682 Aug 10, 2022
a358835
update Delete Godoc to describe soft delete behaviour (#5554)
bruc3mackenzi3 Aug 11, 2022
573b9fa
fix: correct grammar
seaworn Aug 12, 2022
ba227e8
Add Go 1.19 Support (#5608)
Aoang Aug 15, 2022
3f92b9b
Refactor: redundant type from composite literal (#5604)
zaneli Aug 15, 2022
8c3018b
Replace `ioutil.Discard` with `io.Discard` (#5603)
zaneli Aug 15, 2022
d71caef
fix: remove uuid autoincrement (#5620)
a631807682 Sep 3, 2022
f78f635
Optimize: code logic db.scanIntoStruct() (#5633)
demoManito Sep 5, 2022
b3eb1c8
simplified regexp (#5677)
xiaoliwang Sep 5, 2022
f29afdd
Rewrite of finisher_api Godocs (#5618)
bruc3mackenzi3 Sep 9, 2022
edb00c1
AutoMigrate() should always migrate checks, even there is no relation…
googollee Sep 14, 2022
4906259
fix: update omit (#5699)
qqxhb Sep 16, 2022
5ed7b1a
fix: same embedded filed name (#5705)
a631807682 Sep 22, 2022
1f634c3
support scan assign slice cap (#5634)
demoManito Sep 22, 2022
3a72ba1
Allow shared foreign key for many2many jointable
jinzhu Sep 21, 2022
101a7c7
fix: scan array (#5624)
a631807682 Sep 22, 2022
73bc53f
feat: migrator support type aliases (#5627)
a631807682 Sep 22, 2022
1223745
fix: use preparestmt in trasaction will use new conn, close #5508
li-jin-gou Sep 22, 2022
328f301
add some test case which related the logic (#5477)
nohattee Sep 22, 2022
e1dd0dc
chore(deps): bump actions/stale from 5 to 6 (#5717)
dependabot[bot] Sep 30, 2022
be440e7
fix possible nil panic in tests (#5720)
demoManito Sep 30, 2022
a3cc6c6
Fix: wrong value when Find with Join with same column name, close #57…
StephanoGeorge Sep 30, 2022
0b7113b
fix: prepare deadlock (#5568)
a631807682 Sep 30, 2022
9564b82
Fix OnConstraint builder (#5738)
xwjdsh Oct 7, 2022
4b22a55
fix: primaryFields are overwritten (#5721)
demoManito Oct 7, 2022
e8f48b5
fix: limit=0 results (#5735) (#5736)
robhafner Oct 7, 2022
34fbe84
Add TableName with NamingStrategy support, close #5726
jinzhu Oct 7, 2022
983e96f
Add tests for alter column type
jinzhu Oct 8, 2022
e93dc34
Test postgres autoincrement check
jinzhu Oct 8, 2022
2c56954
tests mariadb with returning support
jinzhu Oct 8, 2022
08aa2f9
Update README
jinzhu Oct 14, 2022
aa4312e
Don't display any GORM related package path as source
jinzhu Oct 13, 2022
2a788fb
Upgrade tests go.mod
jinzhu Oct 17, 2022
186e8a9
fix: association without pks (#5779)
a631807682 Oct 18, 2022
ab5f80a
Save as NULL for nil object serialized into json
jinzhu Oct 18, 2022
a0f4d3f
Save as empty string for not nullable nil field serialized into json
jinzhu Oct 18, 2022
62593cf
add test: TestAutoMigrateInt8PG: shouldn't execute ALTER COLUMN TYPE …
viatoriche Oct 18, 2022
3f20a54
Support use clause.Interface as query params
jinzhu Oct 18, 2022
5dd2bb4
feat(PreparedStmtDB): support reset (#5782)
a631807682 Oct 19, 2022
9d82aa5
test: invalid cache plan with prepare stmt (#5778)
a631807682 Oct 20, 2022
b2f4252
fix(Joins): args with select and omit (#5790)
a631807682 Nov 2, 2022
f82e9cf
test(clause/joins): add join unit test (#5832)
demoManito Nov 3, 2022
5c8ecc3
feat: golangci add goimports and whitespace (#5835)
demoManito Nov 5, 2022
fb640cf
test(utils): add utils unit test (#5834)
demoManito Nov 5, 2022
871f1de
fix logger path bug (#5836)
kvii Nov 5, 2022
1b9cd56
doc(README.md): add contributors (#5847)
demoManito Nov 10, 2022
cef3de6
cleanup(prepare_stmt.go): unnecessary map delete (#5849)
demoManito Nov 13, 2022
b6836c2
fix bug in windows (#5844)
kvii Nov 21, 2022
342310f
fix(FindInBatches): throw err if pk not exists (#5868)
a631807682 Nov 21, 2022
f913134
Fix group by with count logic
jinzhu Nov 21, 2022
f931def
clear code syntax (#5889)
wjw1758548031 Dec 1, 2022
d9525d4
fix: skip append relation field to default db value (#5885)
a631807682 Dec 1, 2022
4ec73c9
Add test case for embedded value selects (#5901)
emcfarlane Dec 19, 2022
f3c6fc2
Update func comments in chainable_api and FirstOr_ (#5935)
naterarmstrong Dec 23, 2022
bbd2bbe
fix:Issue migrating field with CURRENT_TIMESTAMP (#5906)
0fv Dec 24, 2022
775fa70
DryRun for migrator (#5689)
defool Dec 24, 2022
1935eb0
feat: support inner join (#5583)
a631807682 Dec 24, 2022
794edad
test(MigrateColumn): mock alter column to improve field compare (#5499)
a631807682 Dec 24, 2022
ddd3cc2
Add ParameterizedQueries option support for logger, close #5288
jinzhu Dec 25, 2022
7da24d1
chore(deps): bump actions/stale from 6 to 7 (#5945)
dependabot[bot] Dec 27, 2022
da2b286
fix(migrator): ignore relationships when migrating #5913 (#5946)
Nomango Jan 1, 2023
16a2722
fix(migrator): Tag default:'null' always causes field migration #5953…
Nomango Jan 1, 2023
4b768c8
Upgrade tests deps
jinzhu Jan 1, 2023
b0e13d9
update github tests action
jinzhu Jan 1, 2023
3d91802
Fix unexpected alter table in auto migration, close #5942, #5943
jinzhu Jan 2, 2023
2bc9137
support implicit table alias, close #5840 #5940
jinzhu Jan 2, 2023
baf1afa
fix(schema): field is only unique when there is one unique index (#5974)
Nomango Jan 11, 2023
3d35ddb
Fix use table.* as select/omit columns
jinzhu Jan 12, 2023
d834dd6
Remove unnecessary code
jinzhu Jan 19, 2023
cfbcedb
fix: support zeroValue tag on DeletedAt (#6011)
qiankunli Feb 1, 2023
4d6b70e
Allow modify statement from dest
jinzhu Feb 2, 2023
e1f46eb
fix: ignore nil query (#6021)
chyroc Feb 2, 2023
878ac51
fix:throw model value required error (#6031)
a631807682 Feb 8, 2023
02b7e26
feat: add tidb integration test cases (#6014)
Feb 8, 2023
532e9cf
Issue 6054: Unscoped not working with PreLoad on Joins (#6058)
manstis Feb 18, 2023
aa89736
fix: miss join type (#6056)
a631807682 Feb 18, 2023
42fc75c
fix: association concurrently appending (#6044)
black-06 Feb 18, 2023
e66a059
fix: update panic if model is not ptr (#6037)
black-06 Feb 18, 2023
04cbd95
test: pgsql migrate unique index (#6028)
a631807682 Feb 18, 2023
391c961
quotes on docker-compose.yml ports (#6089)
xiaoliwang Feb 27, 2023
a80707d
Create and drop view (#6097)
black-06 Feb 27, 2023
877cc91
Remove redundant code (#6087)
xiaoliwang Feb 27, 2023
f387433
Fix Save with stress tests
jinzhu Mar 2, 2023
85eaf9e
feat: Unique Constraint Violation error translator for different driv…
saeidee Mar 6, 2023
e9f25c7
fix: on confilct with default null (#6129)
a631807682 Mar 10, 2023
1643a36
Fix possible concurrency problem for serializer
jinzhu Mar 10, 2023
ed47415
Fix: Composite primary key with auto-increment value returns 0 after …
truongns Mar 10, 2023
707d70a
refactor: translate error only when it is not nil (#6133)
saeidee Mar 10, 2023
b621924
fix: diff schema update assign value (#6096)
a631807682 Mar 10, 2023
654b5f2
test: pgsql alter column from smallint or string to boolean (#6107)
jeffry-luqman Mar 10, 2023
8bf1f26
feat: support nested join (#6067)
a631807682 Mar 10, 2023
cc2d46e
reuse name for savepoints from nested transaction, close #6060
jinzhu Mar 10, 2023
d2dd0ce
chore(deps): bump actions/setup-go from 3 to 4 (#6165)
dependabot[bot] Mar 23, 2023
0c7e575
save should be idempotent #6139 (#6149)
black-06 Mar 23, 2023
1a7ea98
fix: count with group (#6157) (#6160)
black-06 Mar 23, 2023
5d1cdfe
avoid starting a transaction when performing only one insert operatio…
chenyahui Mar 23, 2023
b444011
refactor: translatorError flag added for backward compatibility (#6178)
saeidee Mar 24, 2023
f0360dc
fix: embedded should be nil if not exists (#6219)
a631807682 Apr 11, 2023
59ca46d
fix: `limit(0).offset(0)` return all data (#6191)
Hanwn Apr 11, 2023
1d9f4b0
chore(deps): bump actions/stale from 7 to 8 (#6190)
dependabot[bot] Apr 11, 2023
05bb9d6
refactor(migrator): non-standard codes (#6180)
demoManito Apr 11, 2023
ccc3cb7
fix: many2many association with duplicate belongs to elem (#6206)
bsmith-auth0 Apr 11, 2023
4b0da0e
fix cond in scopes (#6152)
black-06 Apr 11, 2023
828e22b
feat: support embedded preload (#6137)
black-06 Apr 11, 2023
e963702
Update README
jinzhu Apr 11, 2023
ac20d9e
fix: unit test (#6250)
black-06 Apr 21, 2023
32fc201
fix: avoid coroutine leaks when the dialecter initialization fails. (…
onlyice Apr 21, 2023
1f763c8
fix typo chainable_api.go (#6266)
yikakia Apr 26, 2023
407beda
fix: nested joins alias (#6265)
a631807682 Apr 26, 2023
aeb2986
debug: use slice Stale sort (#6263)
Hanwn Apr 26, 2023
67642ab
fix: 🐛 numeric types in pointer embedded struct test failed (#6293)
hykuan May 4, 2023
32045fd
feat: unscoped association (#5899) (#6246)
black-06 May 4, 2023
e61b98d
feat: migrator support table comment (#6225)
johnmai-dev May 5, 2023
6353414
fix: 🐛 embedded struct test failed with custom datatypes (#6311)
aclich May 15, 2023
c3d7d08
Clear SET clause after build SQL
jinzhu May 15, 2023
f5837de
fix:clickhouse error not capture(#6277) (#6321)
201430098137 May 17, 2023
6698ba7
renamed License to LICENSE (#6336)
Avinaba-Bhattacharjee May 21, 2023
001738b
Added support of "Violates Foreign Key Constraint" (#6329)
amirejaz75 May 21, 2023
8197c00
refactor: error translator test (#6350)
saeidee May 25, 2023
812bb20
fix(nested transaction): SavePoint SQL Statement not support in Prepa…
wangliuyang520 May 26, 2023
11fdf46
fix: save with hook (#6285) (#6294)
black-06 May 26, 2023
26663ab
max identifier length changed to 63 (#6337)
alidevhere May 30, 2023
740f2be
fix: begin transaction fail, rollback panic (#6365)
zhouit May 31, 2023
c1ea730
fix: avoid panic when open fails
black-06 Jun 1, 2023
7a76c04
refactor: remove unnecessary prepared statement allocation (#6374)
lzakharov Jun 5, 2023
5eaccaa
reafactor: add nil detection when sqldb return (#6373)
KantaHasegawa Jun 5, 2023
661781a
feat: add *sql.DB connector that uses database context (#6366)
lzakharov Jun 5, 2023
7157b7e
fix: database/sql.Scanner should not retain references (#6380)
ncruces Jun 7, 2023
7dd702d
Fix incorrect documentation comment (has many -> has one) (#6382)
johannes-riecken Jun 7, 2023
c2d571c
test: coverage for duplicated key err (#6389)
saeidee Jun 10, 2023
2066138
ci: fix mariadb mysqladmin (#6401)
saeidee Jun 10, 2023
c10f807
test: coverage for foreign key violation err (#6403)
saeidee Jul 12, 2023
a7f01bd
Test Pluck with customized type
jinzhu Jul 25, 2023
1fb26ac
test: coverage for tabletype added (#6496)
saeidee Aug 4, 2023
193c454
keep float precision in ExplainSQL (#6495)
kumakichi Aug 4, 2023
f473761
fix: added `SkipHooks` in db `getInstance()` (#6484)
aayushacharya Aug 4, 2023
3c34bc2
refactor: Regex description (#6507)
fayvori Aug 7, 2023
15162af
Support GetDBConnWithContext PreparedStmtDB
jinzhu Aug 10, 2023
bae684b
fix(clause): when the value of clause.Eq is an empty array, the SQL s…
whcao Aug 10, 2023
fef4294
feat: rm GetDBConnWithContext method (#6535)
qqxhb Aug 19, 2023
2c20897
add float32 test case (#6530)
Heliner Aug 19, 2023
7e44f73
fix schema GetIdentityFieldValuesMap interface or ptr (#6417)
uptutu Aug 19, 2023
ac07543
Fixed error message when dialector fails to initialize (#6509)
RatajVaver Aug 20, 2023
653732e
Update go testing versions
jinzhu Aug 24, 2023
e57e5d8
Update go.mod
jinzhu Aug 27, 2023
2095d42
fix: sqlite dialector cannot apply `PRIMARY KEY AUTOINCREMENT` type (…
samuelncui Oct 9, 2023
9d8a5bb
feat: reuse name (#6626)
philhuan Oct 10, 2023
12ba285
*datatypes.JSON in model causes panic on tx.Statement.Changed (#6611)
matoubidou Oct 10, 2023
8c18714
Don't call MethodByName with a variable arg (#6602)
jquirke Oct 10, 2023
1b24081
chore(deps): bump actions/checkout from 3 to 4 (#6586)
dependabot[bot] Oct 10, 2023
6bef318
add support for returning in sqlserver (#6585)
FrancoLiberali Oct 10, 2023
78e9059
tests/sqilte: enable FOREIGN_KEYS inside OpenTestConnection (#6641)
glebarez Oct 26, 2023
5adc0ce
test: fix TestEmbeddedRelations (#6639)
a631807682 Oct 26, 2023
9fea15a
feat: add MigrateColumnUnique (#6640)
black-06 Oct 30, 2023
d2fb7a9
chore(logger): optimize (#6675)
flc1125 Nov 7, 2023
40f4afe
docs: fix broken link (#6673)
kijimaD Nov 7, 2023
c1e911f
Update tests/go.mod
jinzhu Nov 9, 2023
3207ad6
map insert support return increment id (#6662)
FangSqing Nov 15, 2023
f0af94c
add test to show that update from works
FrancoLiberali Sep 6, 2023
2fb4928
refactor: Resolve implicit memory aliasing in for loop (#6730)
BugKillerPro Dec 15, 2023
b9ebdb1
Making locking parameters more intuitive (#6719)
dogenkigen Dec 15, 2023
a2cac75
feature: bring custom type and id column name to polymorphism (#6716)
alexisvisco Dec 15, 2023
436cca7
fix: join and select mytable.* not working (#6761)
StephanoGeorge Dec 23, 2023
87decce
fix: ExplainSQL using consecutive pairs of escaper in SQL string repr…
iTanken Dec 28, 2023
940358e
Fix tests doesn't follow https://gorm.io/docs/method_chaining.html co…
jinzhu Jan 12, 2024
0123dd4
fix: ignore .gen.go suffix in logger to get the real caller when usin…
0xJacky Jan 12, 2024
e043924
chore(deps): bump actions/cache from 3 to 4 (#6802)
dependabot[bot] Jan 29, 2024
418ee3f
fix: preload shouldn't overwrite the value of join (#6771)
black-06 Jan 29, 2024
46816ad
refactor: distinguish between Unique and UniqueIndex (#6386)
black-06 Feb 4, 2024
9514d5f
let limit and offset use bind parameter (#6806)
jasonchuan Feb 6, 2024
8fb9a31
refactor: part 2 of distinguish between Unique and UniqueIndex (#6822)
black-06 Feb 6, 2024
d81ae6f
Fixed: panic on nullable value with multiple foreign key usage (#6839)
shtrih Feb 19, 2024
52404cd
CHORE add unittest test function ConvertMapToValueForCreate (#6846)
naruchet Feb 27, 2024
f118e55
Add unittest test helper function ConvertSliceOfMapToValuesForCreate …
naruchet Mar 5, 2024
3e2c4fc
Fix regression in db.Not introduced in v1.25.6. (#6844)
tsuba3 Mar 5, 2024
f17a752
Signed-off-by: hishope <[email protected]>
hishope Mar 7, 2024
9efae65
test: namer identifier lenght (#6872)
a631807682 Mar 9, 2024
c4c9aa4
fix(scan.go): reflect.MakeSlice passes in the reflect.Array type (#6880)
demoManito Mar 9, 2024
e4e23d2
fix: nested preload with join panic when find (#6877)
black-06 Mar 9, 2024
7b1fb0b
fix(scan): array element is set to a zero value (#6890)
demoManito Mar 15, 2024
281f3e3
Fix constraint name regexp
jinzhu Mar 18, 2024
ab89d54
chore: UnixNano convert to UnixMilli (#6907)
demoManito Mar 18, 2024
f7ebf04
fix(create): fix insert column order (#6855)
archever Mar 18, 2024
303de6e
chore: optimize `regEnLetterAndMidline` regular (#6908)
demoManito Mar 18, 2024
e0c3be0
Fix tests in local
jinzhu Mar 18, 2024
1b0aa80
Fix AutoMigrate for bool fields with default value
jinzhu Mar 18, 2024
81536f8
Fix insert id into map results, fix #6812
jinzhu Mar 19, 2024
5760388
Only close bad conn prepared stmt
jinzhu Mar 20, 2024
0d6c534
Don't close prepared stmt for normal db error
jinzhu Mar 21, 2024
956f7ce
fix: 'type XXXX int' will print wrong sql to terminal (#6917)
wangzeping722 Mar 21, 2024
26195e6
fix: remove `callback` from `callbacks` if `Remove()` called (#6916)
snackmgmg Mar 26, 2024
1b48aa0
feat: prepare_stmt support ping (#6924)
philhuan Mar 28, 2024
1e13fd7
Fix duplicated columns in INSERT SQL for some fields with default value
jinzhu Apr 8, 2024
9a61ef2
fix: duplicated preload (#6948)
yetone Apr 15, 2024
d0b4ceb
Added comment describing Unscoped() method (#6969)
AntonyChR Apr 17, 2024
bc49365
Faster utils.FileWithLineNum (#6981)
kkocdko Apr 22, 2024
5553ff3
downgrade mssql driver
jinzhu Apr 25, 2024
85299bf
perf: merge nested preload query when using join (#6990)
a631807682 Apr 25, 2024
207f1ac
fix: not clause with or condition (#6984)
a631807682 Apr 25, 2024
ac59252
Add new error for "Violation Check Constraint" (#6992)
anilsenay Apr 26, 2024
7892019
Fix panic bug in migrator due to lack of nil check for stmt.Schema (#…
pixelmaxQm Apr 26, 2024
9d370bc
Fix handling of unknown column types (#6540)
looi Apr 26, 2024
5e599a0
fix: typo (#7003)
hakusai22 May 8, 2024
0f105ec
fix: strings.Title -> cases.Title bcs strings.Title library is deprec…
ryuji-cre8ive Jun 12, 2024
49d94c1
upgrade github action tests template
jinzhu Jun 12, 2024
49d524a
feat: chainable order support clause.OrderBy (#7054)
supergem3000 Jun 12, 2024
9c4070e
fix: AfterQuery should clear FROM Clause's Joins rather than the Stat…
liov Jun 12, 2024
3fe7fcf
fix: `unsupported data` on nested joins with preloads (#6957)
N-Schaef Jun 12, 2024
78c6dfd
Fix association replace non-addressable panic (#7012)
SergeiSadov Jun 12, 2024
05167fd
fix: use reflect.Append when preloading nested associations (#7014)
emilienkofman Jun 12, 2024
73a988c
fix(scan): update Scan function to reset structs to zero values for e…
Waldeedle Jun 12, 2024
3d09f79
only listen local port
jinzhu Jun 13, 2024
79bf7f9
fix CI for sqlserver
jinzhu Jun 17, 2024
109f239
add DB level propagation for the Unscoped flag (#7007)
sprataa Jun 17, 2024
4f62911
Allow to support other field types
jinzhu Jun 20, 2024
8a0af58
fix map fields with clickhouse driver
jinzhu Jun 20, 2024
11c4331
feat: add MapColumns method (#6901)
molon Jun 24, 2024
4a50b36
ci: Add PostgreSQL 14 and 15 to GitHub Actions matrix (#7081)
enomotodev Jun 25, 2024
0dbfda5
fix memory leaks in PrepareStatementDB (#7142)
ivila Aug 22, 2024
0daaf17
fix: AfterQuery using safer right trim while clearing from clause's j…
bhowmik-abhijeet Aug 22, 2024
7f75b12
Generate unique savepoint names for nested transactions (#7174)
phroggyy Sep 14, 2024
c2515ce
feat: remove version top-level element and rename. (#7086)
isso-719 Sep 18, 2024
68434b7
fix test script with latest docker release
jinzhu Sep 18, 2024
c6ac548
Use official SQL Server docker image for tests (#7205)
omkar-foss Sep 30, 2024
62bd0b9
Add GitHub Actions workflow to automate release creation on tagged pu…
YidiDev Sep 30, 2024
8020e8c
refactor: improve logging for unimplemented ErrorTranslator in Transl…
Invidam Oct 9, 2024
52e3b35
refactor(workflow): update release workflow to enhance automation (#7…
YidiDev Oct 9, 2024
deceebf
Create CODE_OF_CONDUCT.md (#7240)
omidfth Oct 17, 2024
b0d70a2
[#6372] Fixed nullable constraint bug for columns during auto migrati…
wookie0 Nov 14, 2024
49bbaa6
use map look-up for indexes (#7242)
abbyssoul Nov 14, 2024
6bfccf8
Refactor all tests script
jinzhu Nov 21, 2024
f482f25
fix: deterministic index ordering when migrating (#7208)
bamo Dec 6, 2024
4ef3af1
feat:Capitalize the priority field of IndexOption so that other syste…
nowindexman Jan 12, 2025
8503287
Fixed Empty Returning Clause Merge Bug (#7339)
aviyam181199 Jan 12, 2025
fed4923
Enhance db.Scan with ParamsFilter - Issue 7336 - Suggestion (#7337)
evyaffe Jan 12, 2025
86b1d22
chore: update copyright year (#7332)
maxktz Jan 12, 2025
9ca84b3
fix concurrent map writes (#7298)
Ponywka Jan 12, 2025
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
5 changes: 5 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These are supported funding model platforms

github: [jinzhu]
patreon: jinzhu
open_collective: gorm
45 changes: 0 additions & 45 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

9 changes: 0 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
- package-ecosystem: gomod
directory: /tests
schedule:
interval: weekly
166 changes: 166 additions & 0 deletions .github/labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
{
"labels": {
"critical": {
"name": "type:critical",
"colour": "#E84137",
"description": "critical questions"
},
"question": {
"name": "type:question",
"colour": "#EDEDED",
"description": "general questions"
},
"feature": {
"name": "type:feature_request",
"colour": "#43952A",
"description": "feature request"
},
"invalid_question": {
"name": "type:invalid question",
"colour": "#CF2E1F",
"description": "invalid question (not related to GORM or described in document or not enough information provided)"
},
"with_playground": {
"name": "type:with reproduction steps",
"colour": "#00ff00",
"description": "with reproduction steps"
},
"without_playground": {
"name": "type:missing reproduction steps",
"colour": "#CF2E1F",
"description": "missing reproduction steps"
},
"has_pr": {
"name": "type:has pull request",
"colour": "#43952A",
"description": "has pull request"
},
"not_tested": {
"name": "type:not tested",
"colour": "#CF2E1F",
"description": "not tested"
},
"tested": {
"name": "type:tested",
"colour": "#00ff00",
"description": "tested"
},
"breaking_change": {
"name": "type:breaking change",
"colour": "#CF2E1F",
"description": "breaking change"
}
},
"issue": {
"with_playground": {
"requires": 1,
"conditions": [
{
"type": "descriptionMatches",
"pattern": "/github.com\/go-gorm\/playground\/pull\/\\d\\d+/s"
}
]
},
"critical": {
"requires": 1,
"conditions": [
{
"type": "descriptionMatches",
"pattern": "/(critical|urgent)/i"
},
{
"type": "titleMatches",
"pattern": "/(critical|urgent)/i"
}
]
},
"question": {
"requires": 1,
"conditions": [
{
"type": "titleMatches",
"pattern": "/question/i"
},
{
"type": "descriptionMatches",
"pattern": "/question/i"
}
]
},
"feature": {
"requires": 1,
"conditions": [
{
"type": "titleMatches",
"pattern": "/feature/i"
},
{
"type": "descriptionMatches",
"pattern": "/Describe the feature/i"
}
]
},
"without_playground": {
"requires": 6,
"conditions": [
{
"type": "descriptionMatches",
"pattern": "/^((?!github.com\/go-gorm\/playground\/pull\/\\d\\d+).)*$/s"
},
{
"type": "titleMatches",
"pattern": "/^((?!question).)*$/s"
},
{
"type": "descriptionMatches",
"pattern": "/^((?!question).)*$/is"
},
{
"type": "descriptionMatches",
"pattern": "/^((?!Describe the feature).)*$/is"
},
{
"type": "titleMatches",
"pattern": "/^((?!critical|urgent).)*$/s"
},
{
"type": "descriptionMatches",
"pattern": "/^((?!critical|urgent).)*$/s"
}
]
}
},
"pr": {
"critical": {
"requires": 1,
"conditions": [
{
"type": "descriptionMatches",
"pattern": "/(critical|urgent)/i"
},
{
"type": "titleMatches",
"pattern": "/(critical|urgent)/i"
}
]
},
"not_tested": {
"requires": 1,
"conditions": [
{
"type": "descriptionMatches",
"pattern": "/\\[\\] Tested/"
}
]
},
"breaking_change": {
"requires": 1,
"conditions": [
{
"type": "descriptionMatches",
"pattern": "/\\[\\] Non breaking API changes/"
}
]
}
}
}
20 changes: 20 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name-template: 'v Release $NEXT_PATCH_VERSION 🌈'
tag-template: 'v$NEXT_PATCH_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&'
template: |
## Changes

$CHANGES
31 changes: 31 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Create Release

on:
push:
tags:
- 'v*.*.*'

permissions:
contents: write
pull-requests: read

jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Generate Release Notes and Publish
id: generate_release_notes
uses: release-drafter/release-drafter@v6
with:
config-name: 'release-drafter.yml'
name: "Release ${{ github.ref_name }}"
tag: ${{ github.ref_name }}
publish: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/invalid_question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Close invalid questions issues"
on:
schedule:
- cron: "*/10 * * * *"

permissions:
contents: read

jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
env:
ACTIONS_STEP_DEBUG: true
steps:
- name: Close Stale Issues
uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
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) ✨"
stale-issue-label: "status:stale"
days-before-stale: 0
days-before-close: 30
remove-stale-when-updated: true
only-labels: "type:invalid question"

19 changes: 19 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Issue Labeler"
on:
issues:
types: [opened, edited, reopened]
pull_request:
types: [opened, edited, reopened]

jobs:
triage:
runs-on: ubuntu-latest
name: Label issues and pull requests
steps:
- name: check out
uses: actions/checkout@v4

- name: labeler
uses: jinzhu/super-labeler-action@develop
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
27 changes: 27 additions & 0 deletions .github/workflows/missing_playground.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Close Missing Playground issues"
on:
schedule:
- cron: "*/10 * * * *"

permissions:
contents: read

jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
env:
ACTIONS_STEP_DEBUG: true
steps:
- name: Close Stale Issues
uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
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) ✨"
stale-issue-label: "status:stale"
days-before-stale: 0
days-before-close: 30
remove-stale-when-updated: true
only-labels: "type:missing reproduction steps"
22 changes: 22 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: reviewdog
on: [pull_request]
jobs:
golangci-lint:
name: runner / golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2

- name: Setup reviewdog
uses: reviewdog/action-setup@v1

- name: gofumpt -s with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go install mvdan.cc/[email protected]
gofumpt -e -d . | \
reviewdog -name="gofumpt" -f=diff -f.diff.strip=0 -reporter=github-pr-review
Loading