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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## v1.0.1

- Fix: `dry-run` on a detached HEAD (every `pull_request` checkout) failed with
"detached HEAD, branch name unavailable". The branch is now taken from the event
for `dry-run` as well as for push.
- `action.yml` description shortened to 110 characters; GitHub Marketplace
requires fewer than 125.
- README: the API URL note now names only the public `https://<org>.app.dstl8.ai`
host. No change to the action's behavior.
- Repository: SOC 2 change-management protection on `main` (pull request with one
Expand Down
29 changes: 14 additions & 15 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: dstl8 code graph push
description: >
Extract your repository's code graph (log sites, symbols, services — metadata
only, never source) with the dstl8 CLI and push it to your Dstl8 org.
description: "Push your repository's code graph to Dstl8: log sites, symbols and services. Metadata only, never source code."
author: ControlTheory
branding:
icon: share-2
Expand Down Expand Up @@ -173,18 +171,6 @@ runs:

[ -d "${IN_PATH}" ] || bail "path ${IN_PATH} does not exist (did you run actions/checkout?)"

if [ "${dry_run}" = "true" ]; then
echo "dstl8-codegraph${label}: ${tag} (${os}/${arch}) dry run, nothing will be uploaded"
artifact="${work}/dstl8-codegraph.json"
if ! ( cd "${IN_PATH}" && env -u DSTL8_API_URL -u DSTL8_API_TOKEN \
"${bin}" graph build -o "${artifact}" ${extra[@]+"${extra[@]}"} ); then
bail "graph build failed"
fi
out status dry-run
out artifact-path "${artifact}"
exit 0
fi

# dstl8 refuses a detached HEAD unless told the branch; checkouts of a
# sha or a pull_request merge ref are detached. Name the branch from
# the event unless extra-args already does.
Expand All @@ -204,6 +190,19 @@ runs:
esac
fi

if [ "${dry_run}" = "true" ]; then
echo "dstl8-codegraph${label}: ${tag} (${os}/${arch}) dry run, nothing will be uploaded"
artifact="${work}/dstl8-codegraph.json"
if ! ( cd "${IN_PATH}" && env -u DSTL8_API_URL -u DSTL8_API_TOKEN \
"${bin}" graph build -o "${artifact}" \
${branch_args[@]+"${branch_args[@]}"} ${extra[@]+"${extra[@]}"} ); then
bail "graph build failed"
fi
out status dry-run
out artifact-path "${artifact}"
exit 0
fi

echo "dstl8-codegraph${label}: ${tag} (${os}/${arch}) -> ${DSTL8_API_URL}"
res="$(cd "${IN_PATH}" && "${bin}" graph push --json \
${branch_args[@]+"${branch_args[@]}"} ${extra[@]+"${extra[@]}"})"
Expand Down
Loading