Skip to content

[Docs] Document git:directory resource options#3179

Merged
fellyph merged 3 commits intotrunkfrom
update-git-dir-ref-docs
Jan 26, 2026
Merged

[Docs] Document git:directory resource options#3179
fellyph merged 3 commits intotrunkfrom
update-git-dir-ref-docs

Conversation

@akirk
Copy link
Copy Markdown
Member

@akirk akirk commented Jan 25, 2026

Motivation for the change, related issues

When using git:directory resources, the auto-generated folder name is a sanitized URL (e.g. https-github.com-owner-repo-branch-at-path), which is often undesirable. Also, using branch or tag names for ref requires specifying refType, but this wasn't documented.

Implementation details

  • Added refType to the type definition with valid values: 'branch' | 'tag' | 'commit'
  • Added a note explaining that refType is required when using branch or tag names (only HEAD works without it)
  • Added a note explaining how to use options.targetFolderName to override the folder name
  • Updated the example to show targetFolderName in use

Testing Instructions (or ideally a Blueprint)

Preview the docs site and verify the GitDirectoryReference section at /blueprints/steps/resources/#gitdirectoryreference renders correctly.

akirk added 2 commits January 25, 2026 04:20
Adds documentation explaining how to override the auto-generated folder
name when installing plugins/themes from git repositories.
Adds refType to the type definition and explains that it's required
when using branch or tag names (HEAD works without it).
@akirk akirk requested a review from fellyph January 26, 2026 11:30
- This resource can be used with steps like [`installPlugin`](/blueprints/steps#InstallPluginStep) and [`installTheme`](/blueprints/steps#InstallThemeStep).
- Set `".git": true` to include a `.git` folder containing packfiles and refs so Git-aware tooling can detect the checkout. This currently mirrors a shallow clone of the selected ref.
- When using a branch or tag name for `ref`, you must specify `refType` (e.g. `"refType": "branch"`). Without it, only `HEAD` is reliably resolved.
- Playground automatically detects providers like GitHub and GitLab.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we support GitLab?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I didn't change this, it was just moved further down. I believe so.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Perfect. I will test it to double-check.

Copy link
Copy Markdown
Collaborator

@fellyph fellyph left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

@fellyph fellyph merged commit fa9e42b into trunk Jan 26, 2026
35 checks passed
@fellyph fellyph deleted the update-git-dir-ref-docs branch January 26, 2026 13:49
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.

2 participants