mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-08 22:30:04 -07:00
gitlab_issue: use search instead of title (#7847)
* gitlab_issue: use search instead of title * Create changelog file * Update changelogs/fragments/7847-gitlab-issue-title.yml Co-authored-by: Felix Fontein <felix@fontein.de> * using query_parameters Co-authored-by: Nejc Habjan <hab.nejc@gmail.com> * sanity checks --------- Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
This commit is contained in:
parent
6088e2dc0f
commit
8ea58618db
2 changed files with 3 additions and 1 deletions
|
@ -183,7 +183,7 @@ class GitlabIssue(object):
|
|||
def get_issue(self, title, state_filter):
|
||||
issues = []
|
||||
try:
|
||||
issues = self.project.issues.list(title=title, state=state_filter)
|
||||
issues = self.project.issues.list(query_parameters={"search": title, "in": "title", "state": state_filter})
|
||||
except gitlab.exceptions.GitlabGetError as e:
|
||||
self._module.fail_json(msg="Failed to list the Issues: %s" % to_native(e))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue