-
Notifications
You must be signed in to change notification settings - Fork 1
Update config.go to inlude icon and help url #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds help and icon URLs to the Tableau connector configuration by including field.WithHelpUrl("/docs/baton/tableau") and field.WithIconUrl("/static/app-icons/tableau.svg") in NewConfiguration within pkg/config/config.go. No data handling or validation logic changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App
participant Config as Config.NewConfiguration
participant Field as Field Options
App->>Config: Initialize Tableau configuration
activate Config
Config->>Field: Set standard fields
Note over Field: Existing behavior unchanged
Config->>Field: Apply WithHelpUrl("/docs/baton/tableau")
Config->>Field: Apply WithIconUrl("/static/app-icons/tableau.svg")
deactivate Config
Config-->>App: Configuration with help/icon metadata
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/config/config.go (1)
30-31: Incomplete/misleading Site ID descriptionThe sentence trails off and may confuse users.
Apply:
- field.WithDescription("On Tableau Server, this is referred to as Site ID. On Tableau Cloud"), + field.WithDescription("On Tableau Server, this is referred to as Site ID. On Tableau Cloud, this is the site content URL (short name)."),
| field.WithHelpUrl("/docs/baton/tableau"), | ||
| field.WithIconUrl("/static/app-icons/tableau.svg"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify SDK method names and URL paths
Double-check the SDK uses WithHelpURL/WithIconURL (URL all-caps). If so, these won’t compile as written. Also confirm the paths resolve correctly in the product (some UIs expect absolute URLs).
If needed, apply:
- field.WithHelpUrl("/docs/baton/tableau"),
- field.WithIconUrl("/static/app-icons/tableau.svg"),
+ field.WithHelpURL("/docs/baton/tableau"),
+ field.WithIconURL("/static/app-icons/tableau.svg"),Optionally verify the method names via web search:
🌐 Web query:
Does the ConductorOne baton SDK use WithHelpURL/WithIconURL (URL all-caps) or WithHelpUrl/WithIconUrl?
💡 Result:
I can look that up — which repository/file or language (Go/TypeScript/etc.) do you mean?
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== show pkg/config/config.go (first 200 lines) ==="
sed -n '1,200p' pkg/config/config.go || true
echo
echo "=== search for WithHelpUrl/WithHelpURL/WithIconUrl/WithIconURL in repository ==="
rg -n --hidden -S 'WithHelpUrl|WithHelpURL|WithIconUrl|WithIconURL' -C3 || true
echo
echo "=== show go.mod ==="
sed -n '1,200p' go.mod || trueLength of output: 8511
🌐 Web query:
conductorone baton-sdk WithHelpUrl WithHelpURL WithIconUrl WithIconURL site:github.com
💡 Result:
I searched GitHub for those identifiers in the ConductorOne/Baton codebase. I found the baton-sdk repository and many baton-* connector repos (examples: baton-sdk, baton, baton-demo, baton-aws, baton-github, baton-box). I did not find any exact hits for the symbols "WithHelpUrl", "WithHelpURL", "WithIconUrl", or "WithIconURL" in top-level repo listings returned by the search. Sources inspected: baton-sdk and several connector repos. [1][2][3]
If you want, I can:
- run a GitHub code search (searching file contents) across the ConductorOne org for those exact symbols and return file links, or
- clone and grep the baton-sdk repo and connectors and report exact matches.
Which option do you prefer?
Sources:
[1] https://github.com/ConductorOne/baton-sdk
[2] https://github.com/ConductorOne/baton
[3] https://github.com/ConductorOne/baton-demo
🏁 Script executed:
#!/bin/bash
set -euo pipefail
REPO_DIR=baton-sdk
if [ -d "$REPO_DIR" ]; then
echo "Using existing $REPO_DIR"
else
git clone --depth 1 https://github.com/ConductorOne/baton-sdk.git "$REPO_DIR"
fi
echo
echo "=== Search for WithHelp / WithIcon identifiers in baton-sdk ==="
rg -n --hidden -S 'WithHelp|WithIcon|HelpUrl|HelpURL|IconUrl|IconURL' "$REPO_DIR" -C3 || true
echo
echo "=== List files under pkg/field in baton-sdk ==="
ls -la "$REPO_DIR"/pkg/field || true
echo
echo "=== Show Go files in pkg/field ==="
rg -n --hidden -g "$REPO_DIR/pkg/field/**.go" -S '' || true
echo
echo "=== Show definitions in pkg/field (first 300 lines of any file that looks relevant) ==="
for f in "$REPO_DIR"/pkg/field/*.go; do
echo "----- $f -----"
sed -n '1,300p' "$f" || true
doneLength of output: 266240
Don't change SDK method names; use absolute HTTPS URLs for help/icon
field.WithHelpUrl and field.WithIconUrl are correct (baton-sdk defines WithHelpUrl/WithIconUrl). The SDK/proto validation expects absolute https:// URLs, so update pkg/config/config.go (lines 58–59) to use full HTTPS URLs instead of "/docs/baton/tableau" and "/static/app-icons/tableau.svg".
🤖 Prompt for AI Agents
In pkg/config/config.go around lines 58 to 59, the help and icon URLs are
currently relative ("/docs/baton/tableau" and "/static/app-icons/tableau.svg");
change them to absolute HTTPS URLs (e.g.
"https://<your-domain>/docs/baton/tableau" and
"https://<your-domain>/static/app-icons/tableau.svg") while keeping the same SDK
method names field.WithHelpUrl and field.WithIconUrl so they satisfy the
SDK/proto validation expecting absolute https:// links.
Summary by CodeRabbit
New Features
Documentation