Skip to content

Allow changing instance url - #236

Merged
tomli380576 merged 6 commits into
mainfrom
allow-changing-instance-url
Aug 15, 2026
Merged

Allow changing instance url#236
tomli380576 merged 6 commits into
mainfrom
allow-changing-instance-url

Conversation

@tomli380576

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a Snap-specific mechanism to override the Jira instance URL at runtime (via snap set), and surfaces guidance for users in both the UI and documentation.

Changes:

  • Add a Snap configure hook to persist a jira-server snap config value and invalidate cached Jira credentials when the server changes.
  • Update Snap runtime environment handling so the configured Jira server URL is exported as JIRA_SERVER for app commands.
  • Add user-facing instructions in the Jira auth modal and README on how to change/reset the Jira server URL.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/bugit_v2/bug_report_submitters/jira_submitter.py Shows Snap-only guidance in the Jira auth modal for changing the configured Jira server.
snap/snapcraft.yaml Documents the override mechanism and ensures the submit app runs with the env wrapper.
snap/local/scripts/env_wrapper.sh Exports JIRA_SERVER from Snap-persisted configuration when present.
snap/hooks/configure Implements snap set bugit jira-server=... handling and invalidates cached credentials on change.
README.md Documents how to set/unset the Jira server URL for the Snap install.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread snap/hooks/configure

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

snap/hooks/configure:27

  • The URL sanity-check regex allows values like https://? or https:///path because it doesn't actually require a host portion (despite the comment saying it does). This could lead to storing an unusable Jira server URL and confusing failures at runtime.
    # only a lightweight sanity check: must be an http(s) URL with a host
    # made up of valid URL characters (no whitespace or other invalid
    # chars), not a full validation that it's a real/reachable Jira instance
    if ! printf '%s' "$JIRA_SERVER" | grep -Eq '^https?://[A-Za-z0-9._~:/?#@!$&()*+,;=%-]+$'; then
        echo "jira-server must be a valid URL with no whitespace or invalid characters, e.g. https://your-instance.atlassian.net (got: '$JIRA_SERVER')" >&2

@tomli380576
tomli380576 merged commit 5567406 into main Aug 15, 2026
2 checks passed
@tomli380576
tomli380576 deleted the allow-changing-instance-url branch August 15, 2026 17:42
@tomli380576 tomli380576 linked an issue Aug 15, 2026 that may be closed by this pull request
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.

Allow changing server URL

2 participants