Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/reusable-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,20 @@ jobs:
run: |
set -euo pipefail
if [[ "${INSTALL_MODE}" != "per-org" && "${INSTALL_MODE}" != "per-repo" ]]; then
echo "::error::Invalid install_mode '${INSTALL_MODE}': must be 'per-org' or 'per-repo'"
printf 'Received install_mode: %q\n' "${INSTALL_MODE}"
echo "::error::Invalid install_mode: must be 'per-org' or 'per-repo'"
Comment thread
ggallen marked this conversation as resolved.
exit 1
fi
SRC=".defaults/internal/scaffold/fullsend-repo"
LAYERED_DIRS="agents skills schemas harness plugins policies scripts env"
DEST=""
if [[ "${INSTALL_MODE}" == "per-repo" ]]; then
DEST=".fullsend/"
fi
for dir in ${LAYERED_DIRS}; do
if [[ -d "${SRC}/${dir}" ]]; then
mkdir -p "${dir}"
cp -r "${SRC}/${dir}/." "${dir}/"
mkdir -p "${DEST}${dir}"
cp -r "${SRC}/${dir}/." "${DEST}${dir}/"
fi
done
CUSTOM_BASE="customized"
Expand All @@ -108,8 +113,8 @@ jobs:
find "${CUSTOM_BASE}/${dir}" -type f ! -name '.gitkeep' -print0 \
| while IFS= read -r -d '' f; do
rel="${f#"${CUSTOM_BASE}"/}"
mkdir -p "$(dirname "${rel}")"
cp "${f}" "${rel}"
mkdir -p "$(dirname "${DEST}${rel}")"
cp "${f}" "${DEST}${rel}"
done
fi
done
Expand Down Expand Up @@ -195,6 +200,7 @@ jobs:
with:
agent: code
version: ${{ inputs.fullsend_version }}
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
run-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
status-repo: ${{ inputs.source_repo }}
status-number: ${{ fromJSON(inputs.event_payload).issue.number }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/reusable-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,20 @@ jobs:
run: |
set -euo pipefail
if [[ "${INSTALL_MODE}" != "per-org" && "${INSTALL_MODE}" != "per-repo" ]]; then
echo "::error::Invalid install_mode '${INSTALL_MODE}': must be 'per-org' or 'per-repo'"
printf 'Received install_mode: %q\n' "${INSTALL_MODE}"
echo "::error::Invalid install_mode: must be 'per-org' or 'per-repo'"
exit 1
fi
SRC=".defaults/internal/scaffold/fullsend-repo"
LAYERED_DIRS="agents skills schemas harness plugins policies scripts env"
DEST=""
if [[ "${INSTALL_MODE}" == "per-repo" ]]; then
DEST=".fullsend/"
fi
for dir in ${LAYERED_DIRS}; do
if [[ -d "${SRC}/${dir}" ]]; then
mkdir -p "${dir}"
cp -r "${SRC}/${dir}/." "${dir}/"
mkdir -p "${DEST}${dir}"
cp -r "${SRC}/${dir}/." "${DEST}${dir}/"
fi
done
CUSTOM_BASE="customized"
Expand All @@ -124,8 +129,8 @@ jobs:
find "${CUSTOM_BASE}/${dir}" -type f ! -name '.gitkeep' -print0 \
| while IFS= read -r -d '' f; do
rel="${f#"${CUSTOM_BASE}"/}"
mkdir -p "$(dirname "${rel}")"
cp "${f}" "${rel}"
mkdir -p "$(dirname "${DEST}${rel}")"
cp "${f}" "${DEST}${rel}"
done
fi
done
Expand Down Expand Up @@ -396,6 +401,7 @@ jobs:
with:
agent: fix
version: ${{ inputs.fullsend_version }}
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
run-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
status-repo: ${{ inputs.source_repo }}
status-number: ${{ steps.context.outputs.pr_number }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/reusable-prioritize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,20 @@ jobs:
run: |
set -euo pipefail
if [[ "${INSTALL_MODE}" != "per-org" && "${INSTALL_MODE}" != "per-repo" ]]; then
echo "::error::Invalid install_mode '${INSTALL_MODE}': must be 'per-org' or 'per-repo'"
printf 'Received install_mode: %q\n' "${INSTALL_MODE}"
echo "::error::Invalid install_mode: must be 'per-org' or 'per-repo'"
exit 1
fi
SRC=".defaults/internal/scaffold/fullsend-repo"
LAYERED_DIRS="agents skills schemas harness plugins policies scripts env"
DEST=""
if [[ "${INSTALL_MODE}" == "per-repo" ]]; then
DEST=".fullsend/"
fi
for dir in ${LAYERED_DIRS}; do
if [[ -d "${SRC}/${dir}" ]]; then
mkdir -p "${dir}"
cp -r "${SRC}/${dir}/." "${dir}/"
mkdir -p "${DEST}${dir}"
cp -r "${SRC}/${dir}/." "${DEST}${dir}/"
fi
done
CUSTOM_BASE="customized"
Expand All @@ -109,8 +114,8 @@ jobs:
find "${CUSTOM_BASE}/${dir}" -type f ! -name '.gitkeep' -print0 \
| while IFS= read -r -d '' f; do
rel="${f#"${CUSTOM_BASE}"/}"
mkdir -p "$(dirname "${rel}")"
cp "${f}" "${rel}"
mkdir -p "$(dirname "${DEST}${rel}")"
cp "${f}" "${DEST}${rel}"
done
fi
done
Expand Down Expand Up @@ -151,4 +156,5 @@ jobs:
with:
agent: prioritize
version: ${{ inputs.fullsend_version }}
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
mint-url: ${{ inputs.mint_url }}
16 changes: 11 additions & 5 deletions .github/workflows/reusable-retro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,20 @@ jobs:
run: |
set -euo pipefail
if [[ "${INSTALL_MODE}" != "per-org" && "${INSTALL_MODE}" != "per-repo" ]]; then
echo "::error::Invalid install_mode '${INSTALL_MODE}': must be 'per-org' or 'per-repo'"
printf 'Received install_mode: %q\n' "${INSTALL_MODE}"
echo "::error::Invalid install_mode: must be 'per-org' or 'per-repo'"
exit 1
fi
SRC=".defaults/internal/scaffold/fullsend-repo"
LAYERED_DIRS="agents skills schemas harness plugins policies scripts env"
DEST=""
if [[ "${INSTALL_MODE}" == "per-repo" ]]; then
DEST=".fullsend/"
fi
for dir in ${LAYERED_DIRS}; do
if [[ -d "${SRC}/${dir}" ]]; then
mkdir -p "${dir}"
cp -r "${SRC}/${dir}/." "${dir}/"
mkdir -p "${DEST}${dir}"
cp -r "${SRC}/${dir}/." "${DEST}${dir}/"
fi
done
CUSTOM_BASE="customized"
Expand All @@ -105,8 +110,8 @@ jobs:
find "${CUSTOM_BASE}/${dir}" -type f ! -name '.gitkeep' -print0 \
| while IFS= read -r -d '' f; do
rel="${f#"${CUSTOM_BASE}"/}"
mkdir -p "$(dirname "${rel}")"
cp "${f}" "${rel}"
mkdir -p "$(dirname "${DEST}${rel}")"
cp "${f}" "${DEST}${rel}"
done
fi
done
Expand Down Expand Up @@ -162,6 +167,7 @@ jobs:
with:
agent: retro
version: ${{ inputs.fullsend_version }}
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
run-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
status-repo: ${{ inputs.source_repo }}
status-number: ${{ fromJSON(inputs.event_payload).pull_request.number || fromJSON(inputs.event_payload).issue.number }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/reusable-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,20 @@ jobs:
run: |
set -euo pipefail
if [[ "${INSTALL_MODE}" != "per-org" && "${INSTALL_MODE}" != "per-repo" ]]; then
echo "::error::Invalid install_mode '${INSTALL_MODE}': must be 'per-org' or 'per-repo'"
printf 'Received install_mode: %q\n' "${INSTALL_MODE}"
echo "::error::Invalid install_mode: must be 'per-org' or 'per-repo'"
exit 1
fi
SRC=".defaults/internal/scaffold/fullsend-repo"
LAYERED_DIRS="agents skills schemas harness plugins policies scripts env"
DEST=""
if [[ "${INSTALL_MODE}" == "per-repo" ]]; then
DEST=".fullsend/"
fi
for dir in ${LAYERED_DIRS}; do
if [[ -d "${SRC}/${dir}" ]]; then
mkdir -p "${dir}"
cp -r "${SRC}/${dir}/." "${dir}/"
mkdir -p "${DEST}${dir}"
cp -r "${SRC}/${dir}/." "${DEST}${dir}/"
fi
done
CUSTOM_BASE="customized"
Expand All @@ -106,8 +111,8 @@ jobs:
find "${CUSTOM_BASE}/${dir}" -type f ! -name '.gitkeep' -print0 \
| while IFS= read -r -d '' f; do
rel="${f#"${CUSTOM_BASE}"/}"
mkdir -p "$(dirname "${rel}")"
cp "${f}" "${rel}"
mkdir -p "$(dirname "${DEST}${rel}")"
cp "${f}" "${DEST}${rel}"
done
fi
done
Expand Down Expand Up @@ -176,6 +181,7 @@ jobs:
PRIOR_REVIEW_PROVENANCE: ${{ steps.prior-review.outputs.prior_review_provenance }}
with:
agent: review
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
version: ${{ inputs.fullsend_version }}
run-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
status-repo: ${{ inputs.source_repo }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/reusable-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,20 @@ jobs:
run: |
set -euo pipefail
if [[ "${INSTALL_MODE}" != "per-org" && "${INSTALL_MODE}" != "per-repo" ]]; then
echo "::error::Invalid install_mode '${INSTALL_MODE}': must be 'per-org' or 'per-repo'"
printf 'Received install_mode: %q\n' "${INSTALL_MODE}"
echo "::error::Invalid install_mode: must be 'per-org' or 'per-repo'"
exit 1
fi
SRC=".defaults/internal/scaffold/fullsend-repo"
LAYERED_DIRS="agents skills schemas harness plugins policies scripts env"
DEST=""
if [[ "${INSTALL_MODE}" == "per-repo" ]]; then
DEST=".fullsend/"
fi
for dir in ${LAYERED_DIRS}; do
if [[ -d "${SRC}/${dir}" ]]; then
mkdir -p "${dir}"
cp -r "${SRC}/${dir}/." "${dir}/"
mkdir -p "${DEST}${dir}"
cp -r "${SRC}/${dir}/." "${DEST}${dir}/"
fi
done
CUSTOM_BASE="customized"
Expand All @@ -106,8 +111,8 @@ jobs:
find "${CUSTOM_BASE}/${dir}" -type f ! -name '.gitkeep' -print0 \
| while IFS= read -r -d '' f; do
rel="${f#"${CUSTOM_BASE}"/}"
mkdir -p "$(dirname "${rel}")"
cp "${f}" "${rel}"
mkdir -p "$(dirname "${DEST}${rel}")"
cp "${f}" "${DEST}${rel}"
done
fi
done
Expand Down Expand Up @@ -161,6 +166,7 @@ jobs:
with:
agent: triage
version: ${{ inputs.fullsend_version }}
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
run-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
status-repo: ${{ inputs.source_repo }}
status-number: ${{ fromJSON(inputs.event_payload).issue.number }}
Expand Down
24 changes: 13 additions & 11 deletions docs/plans/deprecate-per-org-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,11 @@ All per-org commands gone.
into the renamed `Config` struct and `ParseConfig()`. This field is
accessed by `run.go` (~lines 189, 192, 201, 205, 237, 243) and
`lock.go` (~lines 170, 173, 181, 185, 264, 268, 270) via
`tryLoadOrgConfig()`/`requireOrgConfig()` in `orgconfig.go`. Update
`orgconfig.go` to use `config.ParseConfig()` instead of
`config.ParseOrgConfig()` and rename functions/file accordingly
(e.g. `tryLoadConfig()`/`requireConfig()`, rename file to
`tryLoadFullsendConfig()`/`requireFullsendConfig()` (renamed from
`tryLoadOrgConfig()`/`requireOrgConfig()`, which remain as var
aliases) in `orgconfig.go`. Update `orgconfig.go` to use
`config.ParseConfig()` instead of `config.ParseOrgConfig()` and
rename functions/file accordingly (e.g. rename file to
`configloader.go` or inline into callers).

**Update all callers:**
Expand All @@ -468,11 +469,12 @@ All per-org commands gone.
`DefaultRoles()` for consistency. Effectively dead code after
per-org removal.
- `internal/cli/orgconfig.go`: Update `config.ParseOrgConfig()` calls
(~lines 22, 42) to `config.ParseConfig()`. Rename
`tryLoadOrgConfig()` → `tryLoadConfig()`, `requireOrgConfig()` →
`requireConfig()`. Rename file to `configloader.go` or inline.
- `internal/cli/run.go`: Update `tryLoadOrgConfig()`/
`requireOrgConfig()` calls (~lines 189, 198, 201, 235, 237) and
to `config.ParseConfig()`. The functions were already renamed to
`tryLoadFullsendConfig()`/`requireFullsendConfig()` (PR #3000); var
aliases `tryLoadOrgConfig`/`requireOrgConfig` can be removed.
Rename file to `configloader.go` or inline.
- `internal/cli/run.go`: Update `tryLoadOrgConfig`/
`requireOrgConfig` var alias calls (~lines 189, 198, 201, 235, 237) and
`orgCfg.AllowedRemoteResources` accesses (~lines 192, 205, 243)
to use the renamed config type and loader functions. Also update
`config.ParseOrgConfig()` (~line 1974): this call reads
Expand All @@ -483,8 +485,8 @@ All per-org commands gone.
and update `ParseConfig()` to populate it. This keeps status
notification configuration available in per-repo mode without
importing the full `RepoDefaults` sub-struct.
- `internal/cli/lock.go`: Update `tryLoadOrgConfig()`/
`requireOrgConfig()` calls (~lines 170, 181, 264) and
- `internal/cli/lock.go`: Update `tryLoadOrgConfig`/
`requireOrgConfig` var alias calls (~lines 170, 181, 264) and
`orgCfg.AllowedRemoteResources` accesses (~lines 173, 185, 268,
270) to use the renamed config type and loader functions.
- Any other files importing `config.PerRepoConfig` or
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/lock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ func TestRunLock_URLRefsNoOrgConfigError(t *testing.T) {
printer := ui.New(os.Stdout)
err := runLock(context.Background(), "noconfig", dir, "", false, resolveFlags{}, printer)
require.Error(t, err)
assert.Contains(t, err.Error(), "URL-referenced resources require an org-level config.yaml")
assert.Contains(t, err.Error(), "URL-referenced resources require a config.yaml")
assert.Contains(t, err.Error(), "allowed_remote_resources")
}

Expand Down Expand Up @@ -1136,7 +1136,7 @@ func TestRunLock_MalformedOrgConfigWithURLRefs(t *testing.T) {
printer := ui.New(os.Stdout)
err := runLock(context.Background(), "badcfg", dir, "", false, resolveFlags{}, printer)
require.Error(t, err)
assert.Contains(t, err.Error(), "parsing org config")
assert.Contains(t, err.Error(), "parsing config")
}

func TestRunLock_NoOrgConfigNoURLRefs(t *testing.T) {
Expand Down Expand Up @@ -1202,7 +1202,7 @@ func TestRunLock_OrgAllowlistSyncedAfterReAttempt(t *testing.T) {
printer := ui.New(os.Stdout)
err := runLock(context.Background(), "urlrefs", dir, "", false, resolveFlags{}, printer)
require.Error(t, err)
assert.Contains(t, err.Error(), "parsing org config")
assert.Contains(t, err.Error(), "parsing config")
}

func TestRunLock_URLBaseAndURLRefsNoOrgConfig(t *testing.T) {
Expand Down
Loading
Loading