From 868deb05e64db64992099b93f461dccc78e38c98 Mon Sep 17 00:00:00 2001 From: wkoot <3715211+wkoot@users.noreply.github.com> Date: Wed, 15 Mar 2023 20:28:42 +0100 Subject: [PATCH] GitLab pipeline source up-to-dateness should take filters into account Fixes #5181 --- .../src/source_collectors/gitlab/source_up_to_dateness.py | 5 ++++- docs/src/changelog.md | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/collector/src/source_collectors/gitlab/source_up_to_dateness.py b/components/collector/src/source_collectors/gitlab/source_up_to_dateness.py index 25822b29de..57e7665450 100644 --- a/components/collector/src/source_collectors/gitlab/source_up_to_dateness.py +++ b/components/collector/src/source_collectors/gitlab/source_up_to_dateness.py @@ -89,7 +89,10 @@ async def _landing_url(self, responses: SourceResponses) -> URL: try: for response in responses: pipelines = await response.json() - urls.extend([(self._datetime(pipeline), pipeline["web_url"]) for pipeline in pipelines]) + urls.extend([ + (self._datetime(pipeline), pipeline["web_url"]) + for pipeline in pipelines if self._include_pipeline(pipeline) + ]) except StopAsyncIteration: pass return max(urls, default=(None, await super()._landing_url(responses)))[1] diff --git a/docs/src/changelog.md b/docs/src/changelog.md index 92876ee4b4..c00a4c129c 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -17,6 +17,7 @@ If your currently installed *Quality-time* version is v4.0.0 or older, please re ### Fixed - The unit name of metrics in MS Teams notifications would not be rendered correctly. Fixes [#5347](https://github.com/ICTU/quality-time/issues/5347). +- GitLab pipeline source up-to-dateness should take filters into account. Fixes [#5181](https://github.com/ICTU/quality-time/issues/5181). ### Changed