Skip to content

Conversation

@zachariahcox
Copy link
Collaborator

@zachariahcox zachariahcox commented Jun 8, 2025

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.

@netlify
Copy link

netlify bot commented Jun 8, 2025

Deploy Preview for slsa canceled.

Name Link
🔨 Latest commit 3d0ef44
🔍 Latest deploy log https://app.netlify.com/projects/slsa/deploys/6851e461236d37000874030e

@zachariahcox zachariahcox requested review from a team and Copilot June 8, 2025 20:53

This comment was marked as outdated.

@zachariahcox zachariahcox changed the title non-spec: tools: add devcontainers and migration script only nonspec: tools: add devcontainers and migration script only Jun 8, 2025
zachariahcox and others added 2 commits June 8, 2025 17:09
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Zachariah Cox <zachariahcox@github.com>
Copy link
Contributor

@TomHennen TomHennen left a 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>
#!/usr/bin/env python3

"""
migrate-to-late-branch.py
Copy link
Collaborator Author

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.

# --- Commit the changes ---
git add --all
git commit -m "Migrate $version to its own branch ($BRANCH)."
git push -u origin "$BRANCH"
Copy link
Collaborator Author

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>
@zachariahcox zachariahcox changed the title nonspec: tools: add devcontainers and migration script only impl: tools: add devcontainers and migration script Jun 17, 2025
@TomHennen
Copy link
Contributor

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).

Copy link
Contributor

Copilot AI left a 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.sh to 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 to contents: write so the git push commands 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
Copy link

Copilot AI Jun 17, 2025

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".

Suggested change
cd $REPO_ROOT
cd "$REPO_ROOT"

Copilot uses AI. Check for mistakes.
@zachariahcox
Copy link
Collaborator Author

@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.

@zachariahcox zachariahcox merged commit 8a825b8 into slsa-framework:main Jun 17, 2025
5 of 6 checks passed
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Issue triage Jun 17, 2025
@zachariahcox zachariahcox deleted the users/zacox/devcontainers branch June 17, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants