mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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
2
changelogs/fragments/7847-gitlab-issue-title.yml
Normal file
2
changelogs/fragments/7847-gitlab-issue-title.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- gitlab_issue - fix behavior to search GitLab issue, using ``search`` keyword instead of ``title`` (https://github.com/ansible-collections/community.general/issues/7846).
|
|
@ -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…
Reference in a new issue