Skip to content

Commit dcea7bc

Browse files
changed logic for determining whether the script should run to be inside the script itself rather than gh actions workflow
1 parent cea2406 commit dcea7bc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/regression_tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,10 @@ jobs:
108108
run: make install
109109

110110
- name: App product to APP for PR
111-
if: ${{ startsWith(github.event.inputs.pull_request_id, 'pr-') }}
112111
env:
113112
PRODUCT: ${{ inputs.product }}
114113
PR_ID: ${{ inputs.pull_request_id }}
115114
run: |
116-
echo This is a pull request run
117-
echo We will now add the product to the app
118115
poetry run python scripts/add_pr_product_to_app.py --product="$PRODUCT" --pr="$PR_ID"
119116
120117
- name: Regression Tests

scripts/add_pr_product_to_app.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ def get_consumer_key(url):
144144
password = os.getenv("APIGEE_PASSWORD")
145145
secret = os.getenv("APIGEE_MFA_SECRET")
146146
product = arguments.product
147+
if product not in [
148+
"EPS-FHIR",
149+
"EPS-FHIR-PRESCRIBING",
150+
"EPS-FHIR-DISPENSING",
151+
]:
152+
print(f"{product} Not supported. Exiting.")
153+
exit(1)
147154
pr_id = arguments.pr.lower()
148155
if "pr-" not in pr_id:
149156
print("Not a Pull Request. Exiting.")

0 commit comments

Comments
 (0)