From 051e55adb2d04f725ecdf8c993ec1afd80ac8995 Mon Sep 17 00:00:00 2001 From: Jeff Flater Date: Sun, 4 May 2025 12:14:56 -0500 Subject: [PATCH 1/2] shared --- test/features/steps/shared_test_steps.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/features/steps/shared_test_steps.py b/test/features/steps/shared_test_steps.py index d9a4ea6..825d8d2 100644 --- a/test/features/steps/shared_test_steps.py +++ b/test/features/steps/shared_test_steps.py @@ -1,5 +1,6 @@ from behave import given, when, then +# Import necessary libraries @then("the response status should be 200") def step_then_status_200(context): assert context.response.status_code == 200, f"Expected 200 but got {context.response.status_code}" From 08fe04916aa0de0797819d42ea25e77f8e9eb5dc Mon Sep 17 00:00:00 2001 From: Jeff Flater Date: Sun, 4 May 2025 12:22:54 -0500 Subject: [PATCH 2/2] update checks --- .github/workflows/enforce-develop-pr.yml | 8 ++++++-- .github/workflows/enforce-staging-pr.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/enforce-develop-pr.yml b/.github/workflows/enforce-develop-pr.yml index 74d4ee7..2acc99f 100644 --- a/.github/workflows/enforce-develop-pr.yml +++ b/.github/workflows/enforce-develop-pr.yml @@ -3,6 +3,7 @@ name: Enforce PRs Only from Develop on: pull_request: branches: [staging] + types: [opened, synchronize, reopened] jobs: check-develop-only: @@ -10,7 +11,10 @@ jobs: steps: - name: Fail if source is not develop run: | + echo "Source branch: ${{ github.head_ref }}" if [[ "${{ github.head_ref }}" != "develop" ]]; then - echo "Only PRs from 'develop' branch are allowed to merge into 'staging'." + echo "❌ Only PRs from 'develop' branch are allowed to merge into 'staging'." exit 1 - fi \ No newline at end of file + else + echo "✅ PR is from develop branch. Proceeding." + fi diff --git a/.github/workflows/enforce-staging-pr.yml b/.github/workflows/enforce-staging-pr.yml index 337229b..16eb376 100644 --- a/.github/workflows/enforce-staging-pr.yml +++ b/.github/workflows/enforce-staging-pr.yml @@ -3,6 +3,7 @@ name: Enforce PRs Only from Staging on: pull_request: branches: [main] + types: [opened, synchronize, reopened] jobs: check-branch: @@ -10,7 +11,10 @@ jobs: steps: - name: Fail if source is not staging run: | + echo "Source branch: ${{ github.head_ref }}" if [[ "${{ github.head_ref }}" != "staging" ]]; then - echo "Only PRs from 'staging' branch are allowed to merge into 'main'." + echo "❌ Only PRs from 'staging' are allowed to merge into 'main'." exit 1 - fi \ No newline at end of file + else + echo "✅ PR is from staging branch. Proceeding." + fi