Skip to content

Commit

Permalink
uncomment logic
Browse files Browse the repository at this point in the history
  • Loading branch information
philnewm committed Sep 3, 2024
1 parent 00166b1 commit 5bd3e97
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,36 +68,8 @@ runs:
shell: bash
run: |
cd $GITHUB_ACTION_PATH
REPO="${{ inputs.repo }}"
PATCH_LABEL="PATCH_BUMP_LABEL"
MINOR_LABEL="MINOR_BUMP_LABEL"
# Run Python script to get version increment
increment=$(python - <<EOF
import github_query

# Retrieve labels from the pull request
pr_labels = github_query.get_labels(github_query.parse_args())

# Get the patch and minor bump labels from the repository
patch_repo_var = github_query.get_repo_var(repo="$REPO", var_name="$PATCH_LABEL")
minor_repo_var = github_query.get_repo_var(repo="$REPO", var_name="$MINOR_LABEL")

# Calculate the version increment
increment = github_query.get_version_increment(
patch_bump_list=patch_repo_var,
minor_bump_list=minor_repo_var,
pr_label_list=pr_labels
)

print(increment)
EOF
)

# Set the output variable for the GitHub Action
increment=$(python -c 'import github_query; pr_labels = github_query.get_labels(github_query.parse_args()); patch_repo_var = github_query.get_repo_var(repo="${{ inputs.repo }}", var_name="PATCH_BUMP_LABEL"); minor_repo_var = github_query.get_repo_var(repo="${{ inputs.repo }}", var_name="MINOR_BUMP_LABEL"); print(github_query.get_version_increment(patch_bump_list=patch_repo_var, minor_bump_list=minor_repo_var, pr_label_list=pr_labels))' "${{ inputs.repo }}" "${{ inputs.query_parameters }}" "${{ inputs.date }}")
echo "increment=$increment" >> $GITHUB_OUTPUT
# increment=$(python -c 'import github_query; pr_labels = github_query.get_labels(github_query.parse_args()); patch_repo_var = github_query.get_repo_var(repo="${{ inputs.repo }}", var_name="PATCH_BUMP_LABEL"); minor_repo_var = github_query.get_repo_var(repo="${{ inputs.repo }}", var_name="MINOR_BUMP_LABEL"); print(github_query.get_version_increment(patch_bump_list=patch_repo_var, minor_bump_list=minor_repo_var, pr_label_list=pr_labels))' "${{ inputs.repo }}" "${{ inputs.query_parameters }}" "${{ inputs.date }}")
# echo "increment=$increment" >> $GITHUB_OUTPUT
- name: Prepare Changelog
id: write-changelog
Expand Down

0 comments on commit 5bd3e97

Please sign in to comment.