Skip to content

feat: add --org flag to install script (#33) - #45

Merged
c-vigo merged 6 commits into
feature/37-automate-standardize-repository-setupfrom
feature/33-set-org-name-install-script
Feb 6, 2026
Merged

c-vigo merged 6 commits into
feature/37-automate-standardize-repository-setupfrom
feature/33-set-org-name-install-script

Conversation

@c-vigo

@c-vigo c-vigo commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Description

Add --org flag to install.sh allowing users to override the default organization name when deploying the devcontainer. The default organization is vigOS.

Related Issue(s)

Closes #33

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Test updates

Changes Made

  • install.sh (+15 lines): Added --org ORG option to argument parsing, help text, and examples. Pass ORG_NAME as environment variable to the container.
  • tests/test_install_script.py (+41 lines): Added unit tests for --org flag:
    • test_org_flag_in_help - Verifies flag is documented
    • test_default_org_in_dry_run - Verifies default is vigOS
    • test_custom_org_in_dry_run - Verifies custom org override works
  • docs/templates/README.md.j2 (+3 lines): Added usage example for --org flag
  • README.md (+3 lines): Regenerated from template
  • CHANGELOG.md (+5 lines): Documented feature under Unreleased > Added

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

# Verified --org appears in help
./install.sh --help | grep org

# Verified default ORG_NAME=vigOS in dry-run
./install.sh --dry-run /tmp/test

# Verified custom org override
./install.sh --dry-run --org MyOrg /tmp/test

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (README.md, CONTRIBUTE.md, etc.)
  • I have updated the CHANGELOG.md in the [Unreleased] section
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

TDD approach was used: red tests were written first, then the feature was implemented to make them green.

- Introduced a new test to verify that pip-licenses is installed and checks its version against the expected value.
- Updated the expected versions dictionary to include pip-licenses.

Refs: #43
- Updated the Containerfile to include pip-licenses in the system installation alongside ruff.
- This change ensures that pip-licenses is available for license management in the container.
- Fixes #43

Refs: #43
- Implemented tests to verify the documentation of the --org flag in the help output.
- Added checks for default and custom ORG_NAME values during dry runs.

Refs: #33
- Introduced the --org flag to allow users to override the default organization name during installation.
- Updated help documentation and examples to reflect the new option.
- Modified command execution to pass the ORG_NAME as an environment variable to the container.
- Makes test from 61d73f1 green
- Closes #33

Refs: #33
- Added documentation for the new `--org` flag in the install script, allowing users to specify a custom organization name.
- Updated the CHANGELOG

Refs: #33
@c-vigo c-vigo self-assigned this Feb 6, 2026
@c-vigo
c-vigo merged commit 1bbfe7d into feature/37-automate-standardize-repository-setup Feb 6, 2026
1 check passed
@c-vigo
c-vigo deleted the feature/33-set-org-name-install-script branch February 6, 2026 09:19
gerchowl added a commit that referenced this pull request Feb 18, 2026
c-vigo added a commit that referenced this pull request Feb 19, 2026
## Summary

- **fix(setup):** rewrite host-specific paths in `.gitconfig` at export time and refactor devcontainer lifecycle hooks — one-time setup moved from `postAttachCommand` to `postCreateCommand`, new `verify-auth.sh` for lightweight attach-time checks ([#60](#60))
- **docs:** fix broken `curl | bash -s` install examples (wrong `--` separator placement) and clarify bare semver image tags vs v-prefixed git tags ([#57](#57))
- **style:** apply canonical `just --fmt` formatting to `justfile.base` and `justfile.project` ([#45](#45))

## Related Issues

Refs: #60, #57, #45

## Type of Change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] Documentation update
- [x] Refactoring (no functional changes)
- [ ] CI / Build change
- [x] Test updates

## Changes Made

### `fix(setup)` — host paths and lifecycle refactor (#60)
- **`copy-host-user-conf.sh`** — generates a container-ready `.gitconfig` rewriting host paths (`user.signingkey`, `gpg.ssh.allowedsignersfile`) to `/root/...` equivalents; strips host-only entries (`credential.*`, `includeIf.*`, `core.excludesfile`)
- **`post-create.sh`** — now runs all one-time setup (git config, SSH keys, gh auth, pre-commit, `uv sync`) previously in `postAttachCommand`
- **`post-attach.sh`** — simplified to auth verification only
- **`verify-auth.sh`** — new script: read-only SSH agent and `gh auth` checks, socket scanning fallback
- **`setup-git-conf.sh`** — heavily slimmed (removed SSH agent scanning logic, now just file placement)
- **`CHANGELOG.md`** — added entry under Fixed
- **`tests/test_image.py`, `tests/test_integration.py`** — added `verify-auth.sh` to expected file lists

### `docs` — install examples and image tags (#57)
- **`README.md`, `docs/templates/README.md.j2`** — moved `--` separator to correct position after `bash -s`; replaced `1.0.0` with `0.2.1`; added semver image tag note
- **`install.sh`** — fixed version references in help text

### `style` — justfile formatting (#45)
- **`justfile.base`** — canonical `just --fmt` spacing for interpolations (`{{args}}` → `{{ args }}`)
- **`justfile.project`** — same formatting, removed extra blank lines

## Testing

- [x] Tests pass locally
- [x] Pre-commit hooks pass

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have updated the documentation accordingly
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section
- [x] My changes generate no new warnings or errors
- [x] New and existing unit tests pass locally with my changes

Refs: #60, #57, #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant