Fix support link pattern and add enforcement check
Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>copilot/update-support-request-link-pattern
parent
760573c8ca
commit
b9d8c3ff7e
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
# Check for non-standard InfluxData support links
|
||||
# Standard link: https://support.influxdata.com (no trailing slash, no path)
|
||||
|
||||
set -e
|
||||
|
||||
EXIT_CODE=0
|
||||
|
||||
echo "Checking for non-standard InfluxData support links..."
|
||||
|
||||
# Find all markdown files with non-standard support.influxdata.com URLs
|
||||
# Check for URLs with paths (/s/contactsupport, /s/login, etc.)
|
||||
if grep -rn "https://support\.influxdata\.com/[^)\s]*" content --include="*.md" | grep -v "https://support\.influxdata\.com)"; then
|
||||
echo ""
|
||||
echo "ERROR: Found support.influxdata.com URLs with paths or trailing slashes."
|
||||
echo "Please use the standard format: https://support.influxdata.com"
|
||||
echo ""
|
||||
EXIT_CODE=1
|
||||
fi
|
||||
|
||||
if [ $EXIT_CODE -eq 0 ]; then
|
||||
echo "✓ All support links use the standard format."
|
||||
fi
|
||||
|
||||
exit $EXIT_CODE
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
extends: substitution
|
||||
message: "Use the standard InfluxData support link format: '%s'"
|
||||
link: "https://github.com/influxdata/docs-v2/blob/master/DOCS-CONTRIBUTING.md"
|
||||
level: error
|
||||
ignorecase: false
|
||||
nonword: true
|
||||
# Match support.influxdata.com URLs with paths or trailing slashes
|
||||
# and suggest the canonical form without them
|
||||
swap:
|
||||
# Match any URL with /s/ path (login, contactsupport, etc.)
|
||||
'https://support\.influxdata\.com/s/[^\)>\s]+': 'https://support.influxdata.com'
|
||||
# Match base URL with trailing slash
|
||||
'https://support\.influxdata\.com/': 'https://support.influxdata.com'
|
||||
|
|
@ -164,6 +164,21 @@ Save images using the following naming format: `project/version-context-descript
|
|||
For example, `influxdb/2-0-visualizations-line-graph.png` or `influxdb/2-0-tasks-add-new.png`.
|
||||
Specify a version other than 2.0 only if the image is specific to that version.
|
||||
|
||||
#### InfluxData Support links
|
||||
|
||||
When linking to InfluxData Support, use the canonical URL without trailing slashes or paths:
|
||||
|
||||
```markdown
|
||||
[contact InfluxData support](https://support.influxdata.com)
|
||||
```
|
||||
|
||||
**Do not use**:
|
||||
- `https://support.influxdata.com/` (trailing slash)
|
||||
- `https://support.influxdata.com/s/contactsupport` (path)
|
||||
- `https://support.influxdata.com/s/login/?ec=302&startURL=%2Fs%2Fcontactsupport` (login redirect)
|
||||
|
||||
The pre-commit hook will check for and reject non-standard support link formats.
|
||||
|
||||
### Essential Frontmatter Reference
|
||||
|
||||
Every documentation page includes frontmatter which specifies information about the page.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Use it to monitor query performance, find slow-running queries, and troubleshoot
|
|||
> #### Query logging is not enabled by default
|
||||
>
|
||||
> The query log is not enabled by default on all clusters as it can create a negligible ingest load on your cluster.
|
||||
> To enable it for your cluster, [contact InfluxData support](https://support.influxdata.com/s/login/?ec=302&startURL=%2Fs%2Fcontactsupport).
|
||||
> To enable it for your cluster, [contact InfluxData support](https://support.influxdata.com).
|
||||
|
||||
Use the Admin UI or the [`influxctl query` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/query/) to view the query log.
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,12 @@ pre-commit:
|
|||
echo " Use 'python' instead of 'py' for code fences."
|
||||
errors=1
|
||||
fi
|
||||
# Check for non-standard support.influxdata.com URLs
|
||||
if grep -E 'https://support\.influxdata\.com/[^)\s]*' {staged_files} 2>/dev/null | grep -v 'https://support\.influxdata\.com)'; then
|
||||
echo "❌ Found non-standard support.influxdata.com URL."
|
||||
echo " Use 'https://support.influxdata.com' (no trailing slash, no path)."
|
||||
errors=1
|
||||
fi
|
||||
exit $errors
|
||||
fail_text: "Deprecated markdown patterns found. See messages above for details."
|
||||
eslint-debug-check:
|
||||
|
|
|
|||
Loading…
Reference in New Issue