Skip to content

Commit 6f7a49b

Browse files
committed
fix: filter on successful jobs only
otherwise we went up getting the same commit back that we're building
1 parent 229daca commit 6f7a49b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/examples/path_filtering.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ usage:
55
version: 2.1
66
setup: true
77
orbs:
8-
path-filtering: affinity/[email protected].2
8+
path-filtering: affinity/[email protected].3
99
workflows:
1010
generate-config:
1111
jobs:

src/scripts/create-parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def parent_commit(merge_queue_support):
101101
if merge_queue_support and (branch == 'master' or branch == 'main'):
102102
print(f"Merge Queue support is enabled, using CircleCI API to get the previously built commit on {branch}")
103103
# make a request to CircleCI API to get the latest build for the branch, we'll use that as our base
104-
url = f'https://circleci.com/api/v1.1/project/github/{org_name}/{repo_name}/tree/{branch}?limit=1'
104+
url = f'https://circleci.com/api/v1.1/project/github/{org_name}/{repo_name}/tree/{branch}?filter=successful&limit=1'
105105

106106
req = urllib.request.Request(
107107
url,

0 commit comments

Comments
 (0)