-
Notifications
You must be signed in to change notification settings - Fork 39
Add search_user Action
#91
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
Merged
floatingstatic
merged 3 commits into
StackStorm-Exchange:master
from
jpavlav:jpavlav/90/add_search_user_action
Feb 2, 2026
Merged
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from lib.base import BaseJiraAction | ||
|
|
||
| __all__ = ["SearchJiraUsersAction"] | ||
|
|
||
|
|
||
| class SearchJiraUsersAction(BaseJiraAction): | ||
| def run( | ||
| self, | ||
| query, | ||
| start_at: int = 0, | ||
| max_results: int = 50, | ||
| include_active: bool = True, | ||
| include_inactive: bool = False, | ||
| ) -> dict[str, str]: | ||
| users = self._client.search_users( | ||
| query=query, | ||
| startAt=start_at, | ||
| maxResults=max_results, | ||
| includeActive=include_active, | ||
| includeInactive=include_inactive, | ||
| ) | ||
| results = [] | ||
|
|
||
| for user in users: | ||
| results.append(user.raw) | ||
|
|
||
| return results |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| --- | ||
| name: search_users | ||
| runner_type: python-script | ||
| description: Search JIRA users with a query | ||
| enabled: true | ||
| entry_point: search_users.py | ||
| parameters: | ||
| query: | ||
| type: string | ||
| description: Query string. Can be something like an email. | ||
| required: true | ||
| start_at: | ||
| type: integer | ||
| description: Offset for pagination | ||
| required: false | ||
| default: 0 | ||
| max_results: | ||
| type: integer | ||
| description: Maximum number of returned results | ||
| default: 50 | ||
| required: false | ||
| include_active: | ||
| type: boolean | ||
| description: True to include active users. | ||
| required: false | ||
| default: true | ||
| include_inactive: | ||
| type: boolean | ||
| description: True to include inactive users. | ||
| required: false | ||
| default: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@jpavlav sorry one more thing i just noticed before I was about to merge... somehow 3.3.0 falls after 3.2.3 in the changelog. Can you please fix? Otherwise lgtm