Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: allow admins to modify notification template delivery method#14116

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
17 commits
Select commitHold shift + click to select a range
2f78056
Update template method API
dannykoppingJul 25, 2024
09da48f
Template method update tests
dannykoppingJul 29, 2024
31da811
make gen
dannykoppingJul 29, 2024
02fbaaf
Using "kind" not "is_system"
dannykoppingJul 29, 2024
2d4dc17
Group routes in AGPL router
dannykoppingJul 29, 2024
1d84f4a
Use PUT since this endpoint is idempotent
dannykoppingJul 29, 2024
f77c2c5
Only use pg when necessary
dannykoppingAug 1, 2024
0546f24
Fix notification settings test
dannykoppingAug 1, 2024
c2f024e
Self-review
dannykoppingAug 2, 2024
a909329
CI
dannykoppingAug 2, 2024
821fdf5
Dispatch notification using custom method
dannykoppingAug 2, 2024
4ba160d
Fix swagger docs
dannykoppingAug 5, 2024
061b2bf
make lint/fmt
dannykoppingAug 5, 2024
8a6e289
Fix tests
dannykoppingAug 5, 2024
d627fef
Test metric collection when dispatching with custom methods
dannykoppingAug 5, 2024
d1817d1
Return early
dannykoppingAug 5, 2024
33e9bc9
feat: add notification preferences business logic & APIs (#14117)
dannykoppingAug 5, 2024
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
16 changes: 13 additions & 3 deletionscli/notifications_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,16 @@ import (
"github.com/coder/coder/v2/testutil"
)

funccreateOpts(t*testing.T)*coderdtest.Options {
t.Helper()

dt:=coderdtest.DeploymentValues(t)
dt.Experiments= []string{string(codersdk.ExperimentNotifications)}
return&coderdtest.Options{
DeploymentValues:dt,
}
}

funcTestNotifications(t*testing.T) {
t.Parallel()

Expand All@@ -42,7 +52,7 @@ func TestNotifications(t *testing.T) {
t.Parallel()

// given
ownerClient,db:=coderdtest.NewWithDatabase(t,nil)
ownerClient,db:=coderdtest.NewWithDatabase(t,createOpts(t))
_=coderdtest.CreateFirstUser(t,ownerClient)

// when
Expand DownExpand Up@@ -72,7 +82,7 @@ func TestPauseNotifications_RegularUser(t *testing.T) {
t.Parallel()

// given
ownerClient,db:=coderdtest.NewWithDatabase(t,nil)
ownerClient,db:=coderdtest.NewWithDatabase(t,createOpts(t))
owner:=coderdtest.CreateFirstUser(t,ownerClient)
anotherClient,_:=coderdtest.CreateAnotherUser(t,ownerClient,owner.OrganizationID)

Expand All@@ -87,7 +97,7 @@ func TestPauseNotifications_RegularUser(t *testing.T) {
require.Error(t,err)
require.ErrorAsf(t,err,&sdkError,"error should be of type *codersdk.Error")
assert.Equal(t,http.StatusForbidden,sdkError.StatusCode())
assert.Contains(t,sdkError.Message,"Insufficient permissions to update notifications settings.")
assert.Contains(t,sdkError.Message,"Forbidden.")

// then
ctx,cancel:=context.WithTimeout(context.Background(),testutil.WaitShort)
Expand Down
249 changes: 247 additions & 2 deletionscoderd/apidoc/docs.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp