Update jira-search-self-hosted extension#26991
Update jira-search-self-hosted extension#26991limonkufu wants to merge 3 commits intoraycast:mainfrom
Conversation
|
Thank you for your contribution! 🎉 🔔 @emanguy @svenwiegand @koseduhemak @LunaticMuch @marinsokol you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="ext/jira-search-self-hosted"
FORK_URL="https://github.com/limonkufu/raycast-extensions.git"
EXTENSION_NAME="jira-search-self-hosted"
REPO_NAME="raycast-extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
There was a problem hiding this comment.
Review Summary
This PR adds configurable default filters (include/exclude for projects, statuses, issue types, and assignees) to the jira-search-self-hosted extension, applying them when no explicit filter is typed in the search box.
Overall: The logic for default filters, override precedence, and JQL generation looks correct. There are two P2 style/best-practice violations of repository conventions that should be addressed before merge.
Confidence: 4/5
Security: No security concerns identified.
Finding 1 — CHANGELOG.md line 3: Hardcoded date instead of {PR_MERGE_DATE} placeholder
The changelog entry uses 2026-04-07 instead of the required {PR_MERGE_DATE} placeholder (rule c2214c11). The placeholder is substituted at merge time; hardcoding a date breaks this convention.
Fix:
## [Update] - {PR_MERGE_DATE}Finding 2 — src/preferences.ts lines 3–17: Manually defined preferences type and custom accessor functions
The file manually defines ExtensionPreferences (lines 3–15) and calls getPreferenceValues<Record<string, unknown>>() with custom readStringPreference/readBooleanPreference wrappers (line 17 onwards), instead of using the auto-generated Preferences namespace from raycast-env.d.ts.
This violates two rules:
- d93fc9fb-a45d-4479-a6a4-b1b4af98ebc8 — use the auto-generated
Preferencestype fromraycast-env.d.tsrather than manually defining the interface. - 61aa4fa9-b8e8-41b4-8b27-f888b95b75af — call
getPreferenceValues<Preferences.CommandName>()(or the extension-level equivalent) directly, not withRecord<string, unknown>and a hand-rolled accessor layer.
Fix:
import { getPreferenceValues } from "@raycast/api";
import { Preferences } from "../raycast-env";
export const prefs = getPreferenceValues<Preferences.Issue>(); // or the appropriate command/extension namespaceThe readStringPreference and readBooleanPreference helpers and the manual ExtensionPreferences interface can then be removed entirely.
Greptile SummaryThis PR adds configurable default filters (include/exclude for projects, statuses, issue types, and assignees) to
Confidence Score: 4/5Safe to merge after addressing the two Raycast convention issues Core filter logic, JQL generation, and precedence rules are all correct. Two P2 convention violations — the hardcoded changelog date and the manually-defined preferences type — should be cleaned up before merging. CHANGELOG.md (date placeholder) and src/preferences.ts (manual type definition)
|
| Filename | Overview |
|---|---|
| extensions/jira-search-self-hosted/CHANGELOG.md | Changelog entry uses hardcoded date instead of required {PR_MERGE_DATE} placeholder |
| extensions/jira-search-self-hosted/package.json | Adds 10 optional textfield preferences for default include/exclude filters; valid structure throughout |
| extensions/jira-search-self-hosted/src/issue-search.ts | New shared JQL-building module with correct filter precedence and override semantics |
| extensions/jira-search-self-hosted/src/issue.ts | Refactored to use shared buildIssueSearchJql; improved issue key validation regex |
| extensions/jira-search-self-hosted/src/open-issues.ts | Refactored to use shared JQL builder with forced assignee and assignee defaults correctly disabled |
| extensions/jira-search-self-hosted/src/preferences.ts | Manually defines Preferences type and wraps getPreferenceValues, violating Raycast auto-generation conventions |
| extensions/jira-search-self-hosted/README.md | Documents new default filter preferences and override behavior clearly |
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/jira-search-self-hosted/CHANGELOG.md
Line: 3
Comment:
**Hardcoded date instead of `{PR_MERGE_DATE}` placeholder**
The changelog title uses a static date rather than the required placeholder; the date is populated automatically at merge time.
```suggestion
## [Update] - {PR_MERGE_DATE}
```
**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}`... ([source](https://app.greptile.com/review/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/jira-search-self-hosted/src/preferences.ts
Line: 3-17
Comment:
**Manual preference type definition against Raycast conventions**
Raycast auto-generates the `Preferences` interface in `raycast-env.d.ts` from `package.json`, so `ExtensionPreferences` should not be defined manually and `getPreferenceValues` should not be typed as `Record<string, unknown>` with custom accessors. The entire `readStringPreference`/`readBooleanPreference` layer is unnecessary.
```typescript
// preferences.ts
import { getPreferenceValues } from "@raycast/api";
export const prefs = getPreferenceValues<Preferences>();
```
All fields (`prefs.defaultIncludeProjects`, etc.) are then typed automatically from the generated interface.
**Rule Used:** What: Don't manually define `Preferences` for `get... ([source](https://app.greptile.com/review/custom-context?memory=d93fc9fb-a45d-4479-a6a4-b1b4af98ebc8))
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Update changelog" | Re-trigger Greptile
- Address review feedback on preferences and changelog - Update changelog - Add default filter configurations - Update changelog - Add default filter configurations - Add default filter configurations
|
Hi @emanguy @svenwiegand @koseduhemak @LunaticMuch @marinsokol , any feedback? |
Description
I got sick of typing in the same issue types and projects on every query so this PR adds some configuration options for default filtering.
Search IssuesandOpen Issues.Open Issuesalways uses the current user as assignee and ignores assignee defaults.@project,#issueType,!status, and%assigneeoverride defaults for that field.Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder