raulcd commented on code in PR #47600:
URL: https://github.com/apache/arrow/pull/47600#discussion_r2406610895


##########
.github/workflows/cpp_extra.yml:
##########
@@ -75,47 +79,11 @@ permissions:
 
 jobs:
   check-labels:
-    name: Check labels
-    runs-on: ubuntu-latest
-    timeout-minutes: 5
-    outputs:
-      ci-extra: ${{ steps.check.outputs.ci-extra }}
-    steps:
-      - name: Checkout Arrow
-        if: github.event_name == 'pull_request'
-        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 
v5.0.0
-      - name: Check
-        id: check
-        env:
-          GH_TOKEN: ${{ github.token }}
-        run: |
-          case "${GITHUB_EVENT_NAME}" in
-            push|schedule)
-              ci_extra=true
-              ;;
-            pull_request)
-              n_ci_extra_labels=$(
-                gh pr view ${{ github.event.number }} \
-                  --jq '.labels[].name | select(. == "CI: Extra")' \
-                  --json labels \
-                  --repo ${GITHUB_REPOSITORY} | wc -l)
-              if [ "${n_ci_extra_labels}" -eq 1 ]; then
-                ci_extra=true
-              else
-                git fetch origin ${GITHUB_BASE_REF}
-                if git diff --stat origin/${GITHUB_BASE_REF}.. | \
-                     grep \
-                       --fixed-strings ".github/workflows/cpp_extra.yml" \
-                       --quiet; then
-                  ci_extra=true
-                else
-                  ci_extra=false
-                fi
-              fi
-              ;;
-          esac
-
-          echo "ci-extra=${ci_extra}" >> "${GITHUB_OUTPUT}"
+    uses: ./.github/workflows/check_labels.yml
+    secrets: inherit
+    with:
+      label: "CI: Extra"

Review Comment:
   I've created a couple of labels: `CI: Extra: Package: Linux` and `CI: Extra: 
C++`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to