chore(dev): add dotenv ignore and secret setup recipe fixes#9
chore(dev): add dotenv ignore and secret setup recipe fixes#9elasticdotventures wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates local developer tooling around environment variables and GitHub Actions secret management, aligning the repo’s release/publish workflows (crates.io + PyPI tokens) with an easier local setup flow.
Changes:
- Enable
justdotenv loading so.envvalues are automatically available to recipes. - Add
justrecipes to help set/update GitHub repo/org secrets (CRATES_IO_TOKEN,PYPI_API_TOKEN) viagh. - Ignore
.envand.env.*files in git to prevent accidental secret commits.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
Justfile |
Enables dotenv auto-load and adds gh-secrets-* helper recipes for setting GitHub secrets from local env vars. |
.gitignore |
Adds ignore rules for .env / .env.* to keep local secrets out of the repo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if gh secret list -R "{{repo}}" | awk '{print $1}' | grep -qx "$name"; then \ | ||
| if [ "{{force}}" = "true" ]; then \ |
There was a problem hiding this comment.
The existence check parses gh secret list human-formatted output via awk '{print $1}', which is brittle if gh changes formatting/headers. Consider using gh secret list -R {{repo}} --json name --jq '.[].name' (or -q query) and matching against that instead for a stable interface.
| echo "SKIP $name: not set in .env"; \ | ||
| continue; \ | ||
| fi; \ | ||
| if gh secret list --org "{{org}}" | awk '{print $1}' | grep -qx "$name"; then \ |
There was a problem hiding this comment.
Same as above: this org-secret existence check relies on parsing gh secret list tabular output with awk, which can break if the CLI output format changes. Prefer gh secret list --org {{org}} --json name --jq '.[].name' (or -q query) for a stable machine-readable check.
| if gh secret list --org "{{org}}" | awk '{print $1}' | grep -qx "$name"; then \ | |
| if gh secret list --org "{{org}}" --json name --jq '.[].name' | grep -qx "$name"; then \ |
No description provided.