Configuration + auth resolution for the Atlassian Cloud APIs.
Pure where it matters: this namespace reads environment variables (and an
optional local, gitignored .env) into compact config maps and reports
whether auth is ready WITHOUT making any network call. URL bases and the
Authorization header are constructed here so the HTTP layer stays a dumb
transport.
No secrets are ever written to tracked files. .env is gitignored.
Configuration + auth resolution for the Atlassian Cloud APIs. Pure where it matters: this namespace reads environment variables (and an optional local, gitignored `.env`) into compact config maps and reports whether auth is ready WITHOUT making any network call. URL bases and the Authorization header are constructed here so the HTTP layer stays a dumb transport. No secrets are ever written to tracked files. `.env` is gitignored.
(auth-header cfg)Authorization header value. Cloud uses Basic base64(email:token); Data
Center uses a Bearer personal access token.
Authorization header value. Cloud uses Basic `base64(email:token)`; Data Center uses a Bearer personal access token.
(bitbucket-auth-header cfg)Authorization header value for Bitbucket. Basic base64(username:token) for
the default scheme (API token or app password); Bearer for OAuth/Forge access
tokens (BITBUCKET_AUTH_SCHEME=bearer).
Authorization header value for Bitbucket. Basic `base64(username:token)` for the default scheme (API token or app password); Bearer for OAuth/Forge access tokens (`BITBUCKET_AUTH_SCHEME=bearer`).
(bitbucket-auth-status)(bitbucket-auth-status cfg)Report whether required Bitbucket config is present. NEVER hits the network.
Basic auth needs username + token; Bearer auth needs only the token. Returns a
map with :configured? and the list of :missing variable names — the token
itself is never echoed back.
Report whether required Bitbucket config is present. NEVER hits the network. Basic auth needs username + token; Bearer auth needs only the token. Returns a map with `:configured?` and the list of `:missing` variable names — the token itself is never echoed back.
Root of the Bitbucket Cloud REST API v2. Unlike Jira/Confluence this is a fixed Atlassian host, not the per-tenant site origin.
Root of the Bitbucket Cloud REST API v2. Unlike Jira/Confluence this is a fixed Atlassian host, not the per-tenant site origin.
(bitbucket-config)(bitbucket-config env-or-fn)Build the Bitbucket config map from the environment (process env overlaid on a
local .env). Bitbucket Cloud is a separate service from Jira/Confluence, so
this reads its OWN variables and never falls back to the JIRA_* ones:
BITBUCKET_USERNAME | BITBUCKET_EMAIL (Basic auth username) BITBUCKET_API_TOKEN | BITBUCKET_APP_PASSWORD | BITBUCKET_TOKEN (Basic password / Bearer token) BITBUCKET_WORKSPACE (optional default workspace slug) BITBUCKET_AUTH_SCHEME = basic | bearer (default basic)
Pass a {"VAR" val} map (or resolver fn) to bypass the real environment.
Build the Bitbucket config map from the environment (process env overlaid on a
local `.env`). Bitbucket Cloud is a separate service from Jira/Confluence, so
this reads its OWN variables and never falls back to the JIRA_* ones:
BITBUCKET_USERNAME | BITBUCKET_EMAIL (Basic auth username)
BITBUCKET_API_TOKEN | BITBUCKET_APP_PASSWORD | BITBUCKET_TOKEN (Basic password / Bearer token)
BITBUCKET_WORKSPACE (optional default workspace slug)
BITBUCKET_AUTH_SCHEME = basic | bearer (default basic)
Pass a `{"VAR" val}` map (or resolver fn) to bypass the real environment.(confluence-auth-status)(confluence-auth-status cfg)Report whether required Confluence config is present. NEVER hits the network.
Report whether required Confluence config is present. NEVER hits the network.
(confluence-config)(confluence-config env-or-fn)Build the Confluence config map from the environment. Because Confluence Cloud lives on the SAME site and uses the SAME API token as Jira, the resolver falls back to the Jira variables when Confluence-specific ones are absent:
CONFLUENCE_BASE_URL | JIRA_BASE_URL (site origin; /wiki optional)
CONFLUENCE_USER_EMAIL | CONFLUENCE_EMAIL | JIRA_USER_EMAIL | JIRA_EMAIL
CONFLUENCE_API_TOKEN | CONFLUENCE_API_KEY | JIRA_API_TOKEN | JIRA_API_KEY
CONFLUENCE_INSTANCE_TYPE = cloud | datacenter (default cloud)
Pass a {"VAR" val} map (or resolver fn) to bypass the real environment.
Build the Confluence config map from the environment. Because Confluence Cloud
lives on the SAME site and uses the SAME API token as Jira, the resolver falls
back to the Jira variables when Confluence-specific ones are absent:
CONFLUENCE_BASE_URL | JIRA_BASE_URL (site origin; `/wiki` optional)
CONFLUENCE_USER_EMAIL | CONFLUENCE_EMAIL | JIRA_USER_EMAIL | JIRA_EMAIL
CONFLUENCE_API_TOKEN | CONFLUENCE_API_KEY | JIRA_API_TOKEN | JIRA_API_KEY
CONFLUENCE_INSTANCE_TYPE = cloud | datacenter (default cloud)
Pass a `{"VAR" val}` map (or resolver fn) to bypass the real environment.(confluence-v1-base cfg)Root of the Confluence Cloud REST API v1, e.g. https://x.atlassian.net/wiki/rest/api
Root of the Confluence Cloud REST API v1, e.g. https://x.atlassian.net/wiki/rest/api
(confluence-v2-base cfg)Root of the Confluence Cloud REST API v2, e.g. https://x.atlassian.net/wiki/api/v2
Root of the Confluence Cloud REST API v2, e.g. https://x.atlassian.net/wiki/api/v2
(env-resolver)(env-resolver dotenv getenv)Return a lookup fn (f "VAR") -> value-or-nil resolving process env over an
optional .env file (process env wins). Pass overrides for testing.
Return a lookup fn `(f "VAR") -> value-or-nil` resolving process env over an optional `.env` file (process env wins). Pass overrides for testing.
(issue-browse-url cfg issue-key)Human browser URL for an issue, e.g. https://x.atlassian.net/browse/ABC-123
Human browser URL for an issue, e.g. https://x.atlassian.net/browse/ABC-123
(jira-agile-base cfg)Root of the Jira Software Agile REST API, e.g. https://x.atlassian.net/rest/agile/1.0 (same path on Cloud and Data Center).
Root of the Jira Software Agile REST API, e.g. https://x.atlassian.net/rest/agile/1.0 (same path on Cloud and Data Center).
(jira-api-base cfg)Root of the Jira platform REST API, e.g. https://x.atlassian.net/rest/api/3
Root of the Jira platform REST API, e.g. https://x.atlassian.net/rest/api/3
(jira-auth-status)(jira-auth-status cfg)Report whether required Jira config is present. NEVER hits the network.
Cloud auth needs base-url + email + token (Basic). Data Center PAT auth needs
only base-url + token (Bearer). Returns a map with :configured? and the list
of :missing variable names — :token itself is never echoed back.
Report whether required Jira config is present. NEVER hits the network. Cloud auth needs base-url + email + token (Basic). Data Center PAT auth needs only base-url + token (Bearer). Returns a map with `:configured?` and the list of `:missing` variable names — `:token` itself is never echoed back.
(jira-config)(jira-config env-or-fn)Build the Jira config map from the environment (process env overlaid on a
local .env). Accepts alternate variable names so it works against either the
spec'd names or a typical Cloud .env:
JIRA_BASE_URL JIRA_USER_EMAIL | JIRA_EMAIL | JIRA_USER JIRA_API_TOKEN | JIRA_API_KEY JIRA_INSTANCE_TYPE = cloud | datacenter (default cloud) JIRA_API_VERSION (default 3 cloud, 2 datacenter)
Pass a {"VAR" val} map (or a resolver fn) to bypass the real environment —
this is the seam tests use, so no test ever needs live credentials.
Build the Jira config map from the environment (process env overlaid on a
local `.env`). Accepts alternate variable names so it works against either the
spec'd names or a typical Cloud `.env`:
JIRA_BASE_URL
JIRA_USER_EMAIL | JIRA_EMAIL | JIRA_USER
JIRA_API_TOKEN | JIRA_API_KEY
JIRA_INSTANCE_TYPE = cloud | datacenter (default cloud)
JIRA_API_VERSION (default 3 cloud, 2 datacenter)
Pass a `{"VAR" val}` map (or a resolver fn) to bypass the real environment —
this is the seam tests use, so no test ever needs live credentials.(jira-software-base cfg)Root of the enhanced Jira Software API (enhanced sprint/epic endpoints), e.g. https://x.atlassian.net/rest/software/1.0.
Root of the enhanced Jira Software API (enhanced sprint/epic endpoints), e.g. https://x.atlassian.net/rest/software/1.0.
(load-dotenv)(load-dotenv path)Parse a .env-style file into a {"VAR" "value"} map. Returns {} if the
file is absent or unreadable. Tolerates export, single/double quotes, blank
lines, and # comment lines. Never throws — a missing .env is normal.
Parse a `.env`-style file into a `{"VAR" "value"}` map. Returns `{}` if the
file is absent or unreadable. Tolerates `export `, single/double quotes, blank
lines, and `#` comment lines. Never throws — a missing `.env` is normal.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |