This is an automated email from the ASF dual-hosted git repository. xuanwo pushed a commit to branch fix-planner in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
commit 561bcd65fee90a6825f3902fe9a93146f2558339 Author: Xuanwo <[email protected]> AuthorDate: Tue Oct 17 23:15:02 2023 +0800 ci: Fix plan not generated correctly for PR from forked repo Signed-off-by: Xuanwo <[email protected]> --- .github/workflows/test_planner.yml | 10 +++++----- scripts/workflow_planner.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_planner.yml b/.github/workflows/test_planner.yml index b6abca42b..29eabd6f9 100644 --- a/.github/workflows/test_planner.yml +++ b/.github/workflows/test_planner.yml @@ -47,19 +47,19 @@ jobs: event_name="${{ github.event_name }}" repository="${{ github.repository }}" files_changed="" - has_secrets="False" - is_push="False" + has_secrets="false" + is_push="false" # Handle event-specific logic if [ "$event_name" == "push" ]; then if [ "$repository" == "apache/incubator-opendal" ]; then - is_push="True" - has_secrets="True" + is_push="true" + has_secrets="true" fi elif [ "$event_name" == "pull_request" ]; then pr_head_repo_fork="${{ github.event.pull_request.head.repo.fork }}" if [ "$pr_head_repo_fork" != "true" ]; then - has_secrets="True" + has_secrets="true" fi git fetch origin main:main diff --git a/scripts/workflow_planner.py b/scripts/workflow_planner.py index 7c8d8f9d7..2bc61a8b4 100755 --- a/scripts/workflow_planner.py +++ b/scripts/workflow_planner.py @@ -40,8 +40,8 @@ def get_provided_cases(): # Check if this workflow needs to read secrets. # # We will check if pattern `secrets.XXX` exist in content. - if not bool(os.getenv("GITHUB_HAS_SECRETS")): - cases[:] = [v for v in cases if "secrets." not in v["content"]] + if not os.getenv("GITHUB_HAS_SECRETS") == "true": + cases[:] = [v for v in cases if "secrets" not in v["content"]] return cases
