Skip to content

Commit 292d9f6

Browse files
committed
Merge branch 'main' into oidc
2 parents 6eae627 + 70bf66e commit 292d9f6

38 files changed

+174
-370
lines changed

.github/dependabot.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ updates:
3535
prefix: "chore"
3636
labels: []
3737
ignore:
38-
update-types:
39-
- version-update:semver-patch
38+
# Ignore patch updates for all dependencies
39+
- dependency-name: "*"
40+
update-types:
41+
- version-update:semver-patch
4042

4143
- package-ecosystem: "npm"
4244
directory: "/site/"
@@ -48,12 +50,15 @@ updates:
4850
prefix: "chore"
4951
labels: []
5052
ignore:
53+
# Ignore patch updates for all dependencies
54+
- dependency-name: "*"
55+
update-types:
56+
- version-update:semver-patch
5157
# Ignore major updates to Node.js types, because they need to
5258
# correspond to the Node.js engine version
5359
- dependency-name: "@types/node"
5460
update-types:
5561
- version-update:semver-major
56-
- version-update:semver-patch
5762

5863
- package-ecosystem: "terraform"
5964
directory: "/examples/templates"

.github/workflows/coder.yaml

+1-44
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
runs-on: ubuntu-latest
3535
outputs:
3636
docs-only: ${{ steps.filter.outputs.docs_count == steps.filter.outputs.all_count }}
37-
go: ${{ steps.filter.outputs.go }}
3837
sh: ${{ steps.filter.outputs.sh }}
3938
steps:
4039
- uses: actions/checkout@v3
@@ -49,10 +48,6 @@ jobs:
4948
- 'docs/**'
5049
# For testing:
5150
# - '.github/**'
52-
go:
53-
- "**.go"
54-
- "**.mod"
55-
- "**.sum"
5651
sh:
5752
- "**.sh"
5853
- id: debug
@@ -63,36 +58,15 @@ jobs:
6358
debug-inputs:
6459
needs:
6560
- changes
66-
- pr-context
6761
runs-on: ubuntu-latest
6862
steps:
6963
- id: log
7064
run: |
7165
echo "${{ toJSON(needs) }}"
72-
echo "${{ contains(needs.pr-context.outputs.skips, 'test/go/postgres') }} "
73-
echo "${{ contains(needs.pr-context.outputs.skips, 'test/e2e') }} "
74-
75-
pr-context:
76-
runs-on: ubuntu-latest
77-
outputs:
78-
skips: ${{ steps.pr-context.outputs.skips }}
79-
steps:
80-
- uses: actions/checkout@v3
81-
- uses: actions/setup-go@v3
82-
with:
83-
go-version: "~1.18"
84-
- id: pr-context
85-
env:
86-
GITHUB_CONTEXT: ${{ toJSON(github) }}
87-
run: |
88-
(cd .github/workflows/prcontext && go build)
89-
./.github/workflows/prcontext/prcontext
9066
9167
style-lint-golangci:
9268
name: style/lint/golangci
9369
timeout-minutes: 5
94-
needs: changes
95-
if: needs.changes.outputs.go == 'true'
9670
runs-on: ubuntu-latest
9771
steps:
9872
- uses: actions/checkout@v3
@@ -108,8 +82,6 @@ jobs:
10882
name: style/lint/shellcheck
10983
timeout-minutes: 5
11084
runs-on: ubuntu-latest
111-
needs: changes
112-
if: needs.changes.outputs.sh == 'true'
11385
steps:
11486
- uses: actions/checkout@v3
11587
- name: Run ShellCheck
@@ -122,8 +94,6 @@ jobs:
12294
style-lint-typescript:
12395
name: "style/lint/typescript"
12496
timeout-minutes: 5
125-
needs: changes
126-
if: needs.changes.outputs.docs-only == 'false'
12797
runs-on: ubuntu-latest
12898
steps:
12999
- name: Checkout
@@ -207,8 +177,6 @@ jobs:
207177

208178
style-fmt:
209179
name: "style/fmt"
210-
needs: changes
211-
if: needs.changes.outputs.docs-only == 'false'
212180
runs-on: ubuntu-latest
213181
timeout-minutes: 5
214182
steps:
@@ -241,8 +209,6 @@ jobs:
241209
242210
test-go:
243211
name: "test/go"
244-
needs: changes
245-
if: needs.changes.outputs.docs-only == 'false'
246212
runs-on: ${{ matrix.os }}
247213
timeout-minutes: 20
248214
strategy:
@@ -328,12 +294,6 @@ jobs:
328294

329295
test-go-postgres:
330296
name: "test/go/postgres"
331-
needs:
332-
- changes
333-
- pr-context
334-
if: >
335-
needs.changes.outputs.docs-only == 'false' &&
336-
!contains(needs.pr-context.outputs.skips, 'test/go/postgres')
337297
runs-on: ubuntu-latest
338298
# This timeout must be greater than the timeout set by `go test` in
339299
# `make test-postgres` to ensure we receive a trace of running
@@ -514,8 +474,6 @@ jobs:
514474

515475
test-js:
516476
name: "test/js"
517-
needs: changes
518-
if: needs.changes.outputs.docs-only == 'false'
519477
runs-on: ubuntu-latest
520478
timeout-minutes: 20
521479
steps:
@@ -571,8 +529,7 @@ jobs:
571529
name: "test/e2e/${{ matrix.os }}"
572530
needs:
573531
- changes
574-
- pr-context
575-
if: needs.changes.outputs.docs-only == 'false' && !contains(needs.pr-context.outputs.skips, 'test/e2e')
532+
if: needs.changes.outputs.docs-only == 'false'
576533
runs-on: ${{ matrix.os }}
577534
timeout-minutes: 20
578535
strategy:

.github/workflows/prcontext/README.md

-7
This file was deleted.

.github/workflows/prcontext/go.mod

-12
This file was deleted.

.github/workflows/prcontext/go.sum

-16
This file was deleted.

.github/workflows/prcontext/main.go

-39
This file was deleted.

.github/workflows/prcontext/parse.go

-28
This file was deleted.

.github/workflows/prcontext/parse_test.go

-38
This file was deleted.

cli/cliui/cliui.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var Styles = struct {
4848
Field: defaultStyles.Code.Copy().Foreground(lipgloss.AdaptiveColor{Light: "#000000", Dark: "#FFFFFF"}),
4949
Keyword: defaultStyles.Keyword,
5050
Paragraph: defaultStyles.Paragraph,
51-
Placeholder: lipgloss.NewStyle().Foreground(lipgloss.Color("240")),
51+
Placeholder: lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "#585858", Dark: "#005fff"}),
5252
Prompt: defaultStyles.Prompt.Foreground(lipgloss.AdaptiveColor{Light: "#9B9B9B", Dark: "#5C5C5C"}),
5353
FocusedPrompt: defaultStyles.FocusedPrompt.Foreground(lipgloss.Color("#651fff")),
5454
Fuschia: defaultStyles.SelectedMenuItem.Copy(),

cli/templateupdate.go renamed to cli/templatepush.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/coder/coder/provisionersdk"
1717
)
1818

19-
func templateUpdate() *cobra.Command {
19+
func templatePush() *cobra.Command {
2020
var (
2121
directory string
2222
provisioner string
@@ -25,9 +25,9 @@ func templateUpdate() *cobra.Command {
2525
)
2626

2727
cmd := &cobra.Command{
28-
Use: "update [template]",
28+
Use: "push [template]",
2929
Args: cobra.MaximumNArgs(1),
30-
Short: "Update the source-code of a template from the current directory or as specified by flag",
30+
Short: "Push a new template version from the current directory or as specified by flag",
3131
RunE: func(cmd *cobra.Command, args []string) error {
3232
client, err := createClient(cmd)
3333
if err != nil {

cli/templateupdate_test.go renamed to cli/templatepush_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/coder/coder/pty/ptytest"
1818
)
1919

20-
func TestTemplateUpdate(t *testing.T) {
20+
func TestTemplatePush(t *testing.T) {
2121
t.Parallel()
2222
// NewParameter will:
2323
// 1. Create a template version with 0 params
@@ -43,7 +43,7 @@ func TestTemplateUpdate(t *testing.T) {
4343
Parse: createTestParseResponse(),
4444
Provision: echo.ProvisionComplete,
4545
})
46-
cmd, root := clitest.New(t, "templates", "update", template.Name, "-y", "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
46+
cmd, root := clitest.New(t, "templates", "push", template.Name, "-y", "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
4747
clitest.SetupConfig(t, client, root)
4848
pty := ptytest.New(t)
4949
cmd.SetIn(pty.Input())
@@ -76,7 +76,7 @@ func TestTemplateUpdate(t *testing.T) {
7676

7777
// Second update of the same source requires no prompt since the params
7878
// are carried over.
79-
cmd, root = clitest.New(t, "templates", "update", template.Name, "-y", "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
79+
cmd, root = clitest.New(t, "templates", "push", template.Name, "-y", "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
8080
clitest.SetupConfig(t, client, root)
8181
go func() {
8282
execDone <- cmd.Execute()
@@ -95,7 +95,7 @@ func TestTemplateUpdate(t *testing.T) {
9595
Provision: echo.ProvisionComplete,
9696
})
9797

98-
cmd, root = clitest.New(t, "templates", "update", template.Name, "-y", "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
98+
cmd, root = clitest.New(t, "templates", "push", template.Name, "-y", "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
9999
clitest.SetupConfig(t, client, root)
100100
go func() {
101101
execDone <- cmd.Execute()
@@ -122,7 +122,7 @@ func TestTemplateUpdate(t *testing.T) {
122122
Parse: echo.ParseComplete,
123123
Provision: echo.ProvisionComplete,
124124
})
125-
cmd, root := clitest.New(t, "templates", "update", template.Name, "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
125+
cmd, root := clitest.New(t, "templates", "push", template.Name, "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
126126
clitest.SetupConfig(t, client, root)
127127
pty := ptytest.New(t)
128128
cmd.SetIn(pty.Input())
@@ -175,7 +175,7 @@ func TestTemplateUpdate(t *testing.T) {
175175

176176
// Don't pass the name of the template, it should use the
177177
// directory of the source.
178-
cmd, root := clitest.New(t, "templates", "update", "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
178+
cmd, root := clitest.New(t, "templates", "push", "--directory", source, "--test.provisioner", string(database.ProvisionerTypeEcho))
179179
clitest.SetupConfig(t, client, root)
180180
pty := ptytest.New(t)
181181
cmd.SetIn(pty.Input())

0 commit comments

Comments
 (0)