-
Notifications
You must be signed in to change notification settings - Fork 274
impl: tools: add devcontainers and migration script #1399
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
impl: tools: add devcontainers and migration script #1399
Conversation
✅ Deploy Preview for slsa canceled.
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zachariah Cox <zachariahcox@github.com>
TomHennen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It would be good to get reviews from some other folks too because I'm not confident enough in my git or bash scripting.
clean up contributing docs Signed-off-by: Zachariah Cox <zachariahcox@gmail.com>
tools/migrate-to-late-branch.py
Outdated
| #!/usr/bin/env python3 | ||
|
|
||
| """ | ||
| migrate-to-late-branch.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need to ship both of these?
I prefer python I guess (I can use a debugger), but bash is probably more traditional here.
tools/migrate-to-late-branch.sh
Outdated
| # --- Commit the changes --- | ||
| git add --all | ||
| git commit -m "Migrate $version to its own branch ($BRANCH)." | ||
| git push -u origin "$BRANCH" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was generally commenting this line out while testing.
posted for review only. Signed-off-by: Zachariah Cox <zachariahcox@gmail.com>
|
FYI I suggested @zachariahcox change this to an 'impl' because it doesn't result in any user visible changes (but it does result in contributor visible changes). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a DevContainer setup to standardize development environments and includes a script and workflow for migrating the docs/spec folders into versioned branches.
- Introduces
migrate-to-late-branch.shto automate splitting specs into release branches - Adds DevContainer configuration (
.devcontainer/) and post-create setup script - Updates GitHub workflows: one for running the migration script and one adjusting the lint step
- Enhances CONTRIBUTING.md with instructions for DevContainers and local setup
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/migrate-to-late-branch.sh | New script to create version-specific branches |
| CONTRIBUTING.md | Added DevContainer usage guide and updated lint setup |
| .github/workflows/migrate-to-late-branch.yml | Workflow to invoke the migration script manually |
| .github/workflows/lint.yml | Updated lint step to point at ./tools/lint.sh |
| .devcontainer/post-create.sh | Installs bundler, Jekyll, gems, and Netlify CLI |
| .devcontainer/devcontainer.json | Defines container image, features, ports, and extensions |
Comments suppressed due to low confidence (2)
.github/workflows/migrate-to-late-branch.yml:7
- The workflow only grants
contents: read, which prevents pushing new branches. Change this tocontents: writeso thegit pushcommands succeed.
contents: read # Minimum permission required to read the repository
CONTRIBUTING.md:109
- [nitpick] The standalone fragment "locally." appears to be orphaned from its sentence. Consider merging it into the previous line to form a complete sentence for clarity.
locally.
|
|
||
| # --- Ensure script is run from the repo root --- | ||
| REPO_ROOT="$(git rev-parse --show-toplevel)" | ||
| cd $REPO_ROOT |
Copilot
AI
Jun 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quote the variable when changing directories to avoid issues with paths containing spaces: use cd "$REPO_ROOT".
| cd $REPO_ROOT | |
| cd "$REPO_ROOT" |
|
@TomHennen @arewm sorry for the runaround -- I found a substantially better way to build this devcontainer using the prebuilt ruby image. It cut build times for me to ~4 minutes from 15 or so on a 2core machine. |
This PR is a paired down version of #1328 focused on adding the devcontainer.
I will also leave the late-branch script in -- I do think we should run it after the release of 1.2.
Here's an example branch produced by this kind of tool.