Skip to content
Permalink
Browse files

[github] auto milestone, fix increase step, try again with bool

  • Loading branch information
3nids committed Jan 10, 2020
1 parent d73f745 commit b4b433887f6da0182803d0d1d8e32e5f78d1d5cf
Showing with 5 additions and 4 deletions.
  1. +5 −4 .github/workflows/pr-auto-milestone.yml
@@ -87,7 +87,8 @@ jobs:
MAX_RELEASE=$(echo "${JSON_DATA}" | jq ".repository.refs.edges[].node.name | select( . | test(\"^final-${QGIS_MAJOR_VERSION}${MINOR_VERSION}\") ) | sub(\"^final-${QGIS_MAJOR_VERSION}_(?<m>[0-9]+)_(?<p>.)\"; .m+\".\"+.p) | tonumber" | jq -s '. | max')
echo "MAX_RELEASE: ${MAX_RELEASE}"
MILESTONE_TITLE="${QGIS_MAJOR_VERSION}."$(echo "${MAX_RELEASE} + 0.1 " | bc)
INCREASE_STEP=$([[ -z ${MINOR_VERSION} ]] && echo "2.0" || echo "0.1" )
MILESTONE_TITLE="${QGIS_MAJOR_VERSION}."$(echo "${MAX_RELEASE} + ${INCREASE_STEP} " | bc)
echo "MILESTONE_TITLE: ${MILESTONE_TITLE}"
MILESTONE_NUMBER=$(echo "${JSON_DATA}" | jq ".repository.milestones.edges[] | select( .node.title == \"${MILESTONE_TITLE}\" ) | .node.number")
@@ -105,7 +106,7 @@ jobs:
# create the milestone if needed
- name: Create milestone if needed
id: create_milestone
if: steps.extract_data.outputs.has_milestone_to_set == "true" && steps.extract_data.outputs.has_milestone_to_create == "true"
if: steps.extract_data.outputs.has_milestone_to_set == true && steps.extract_data.outputs.has_milestone_to_create == true
uses: octokit/request-action@v2.x
with:
route: POST /repos/qgis/QGIS/milestones
@@ -116,7 +117,7 @@ jobs:
# Compute the milestone number
- name: Compute milestone number from existing or created
id: compute_milestone
if: always() && steps.extract_data.outputs.has_milestone_to_set == "true"
if: always() == true && steps.extract_data.outputs.has_milestone_to_set == true
env:
MILESTONE_NUMBER_EXISTING: ${{ steps.calculate_milestone.outputs.milestone_number }}
MILESTONE_NUMBER_CREATED_JSON: ${{ steps.create_milestone.outputs.data }}
@@ -127,7 +128,7 @@ jobs:
# update PR with milestone
- name: update PR milestone
if: steps.extract_data.outputs.has_milestone_to_set == "true"
if: steps.extract_data.outputs.has_milestone_to_set == true
uses: octokit/request-action@v2.x
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b4b4338

Please sign in to comment.
You can’t perform that action at this time.