Skip to content

feat(git): Add update command for ACLs - #1727

Open
Fyusel wants to merge 1 commit into
mainfrom
git-acl-adjustements
Open

Fyusel wants to merge 1 commit into
mainfrom
git-acl-adjustements

Conversation

@Fyusel

@Fyusel Fyusel commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Extend describe command to show ACLs.

STACKITCLI-555

Description

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@Fyusel
Fyusel requested a review from a team as a code owner November 4, 2026 11:44
@Fyusel
Fyusel force-pushed the git-acl-adjustements branch 2 times, most recently from 04e6973 to d98e51a Compare November 4, 2026 11:48
}
}

return outputResult(params.Printer, model.OutputFormat, model.Async, instanceLabel, resp)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: we can pass model, and read the required fields in outputResult function.

}

func outputResult(p *print.Printer, outputFormat string, async bool, instanceLabel string, resp *git.Instance) error {
if resp == nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move this nil check into the OutputResult lambda function below to fix this output for JSON/YAML

@GokceGK

GokceGK commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Not part of this PR, but just recognized while testing. The prompt messages that are used to inform/ confirm, contain text 'stackit git'. I think we should change these to the correct spelling "STACKIT Git."

e.g

prompt := fmt.Sprintf("Are you sure you want to delete the stackit git instance %q for %q?", instanceName, projectName)

Extend describe command to show ACLs.

STACKITCLI-555

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
@Fyusel
Fyusel force-pushed the git-acl-adjustements branch from 56f01dd to 0cb9522 Compare November 5, 2026 07:01
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/git/instance 0.00% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/create 51.02% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/delete 17.78% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/describe 68.09% (+3.80%) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/update 46.15% (+46.15%) 🌟
Coverage details

Compared to commit bc4b561 (run #41845018522)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/create/create.go 51.02% (ø) 49 25 24
github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/delete/delete.go 17.78% (ø) 45 8 37
github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/describe/describe.go 68.09% (+3.80%) 47 (+5) 32 (+5) 15 👍
github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/instance.go 0.00% (ø) 4 0 4
github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/update/update.go 46.15% (+46.15%) 52 (+52) 24 (+24) 28 (+28) 🌟

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files:

  • github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/create/create_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/describe/describe_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/git/instance/update/update_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants