File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,18 @@ def _determine_sync_tag(self):
131
131
132
132
return os .getenv ('EPPO_SYNC_TAG' )
133
133
134
+ def _attach_reference_url (self , payload ):
135
+ """
136
+ Optionally attach reference url to the payload if one exists
137
+ """
138
+
139
+ reference_url = os .getenv ('EPPO_REFERENCE_URL' )
140
+ if not reference_url :
141
+ return payload
142
+
143
+ payload ["reference_url" ] = reference_url
144
+ return payload
145
+
134
146
def sync (self ):
135
147
self .read_yaml_files ()
136
148
if self .sync_prefix is not None :
@@ -151,6 +163,7 @@ def sync(self):
151
163
"fact_sources" : self .fact_sources ,
152
164
"metrics" : self .metrics
153
165
}
166
+ payload = self ._attach_reference_url (payload )
154
167
155
168
response = requests .post (f'{ API_ENDPOINT } { "?allow_upgrades=true" if self .allow_upgrades else "" } ' , json = payload , headers = headers )
156
169
You can’t perform that action at this time.
0 commit comments