<commit_before>name: Upload bottles.

on:
  push:
    branches:
      - master
    paths:
      - 'Formula/*'

jobs:
  upload-bottles:
    if: startsWith(github.event.head_commit.message, 'Merge') == false && github.event.pusher.name != 'BrewTestBot'
    runs-on: ubuntu-latest
    container:
      image: homebrew/brew
    steps:
      - name: Determine associated pull request
        uses: actions/github-script@0.9.0
        id: pr
        with:
          script: |
            const prs = await github.repos.listPullRequestsAssociatedWithCommit({
              ...context.repo,
              commit_sha: context.payload.head_commit.id
            })
            console.log(prs.data.length + " prs")
            if (prs.data.length === 0) {
              throw "No pull requests are associated with this merge commit."
            }
            core.setOutput("number", prs.data[0].number.toString())
            core.setOutput("head_sha", prs.data[0].head.sha)
      - name: Download workflow artifacts
        uses: Homebrew/actions/download-artifact@master
        with:
          github_token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
          workflow: build-bottles.yml
          commit: ${{steps.pr.outputs.head_sha}}
          name: bottles
          path: bottles
      - name: Upload and publish bottles
        env:
          HOMEBREW_BINTRAY_USER: LinuxbrewTestBot
          HOMEBREW_BINTRAY_KEY: ${{secrets.HOMEBREW_BINTRAY_KEY}}
        if: steps.pr.outputs.number != 0<commit_msg>workflows: update workflow name<commit_after>name: Upload bottles.

on:
  push:
    branches:
      - master
    paths:
      - 'Formula/*'

jobs:
  upload-bottles:
    if: startsWith(github.event.head_commit.message, 'Merge') == false && github.event.pusher.name != 'BrewTestBot'
    runs-on: ubuntu-latest
    container:
      image: homebrew/brew
    steps:
      - name: Determine associated pull request
        uses: actions/github-script@0.9.0
        id: pr
        with:
          script: |
            const prs = await github.repos.listPullRequestsAssociatedWithCommit({
              ...context.repo,
              commit_sha: context.payload.head_commit.id
            })
            console.log(prs.data.length + " prs")
            if (prs.data.length === 0) {
              throw "No pull requests are associated with this merge commit."
            }
            core.setOutput("number", prs.data[0].number.toString())
            core.setOutput("head_sha", prs.data[0].head.sha)
      - name: Download workflow artifacts
        uses: Homebrew/actions/download-artifact@master
        with:
          github_token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
          workflow: tests.yml
          commit: ${{steps.pr.outputs.head_sha}}
          name: bottles
          path: bottles
      - name: Upload and publish bottles
        env:
          HOMEBREW_BINTRAY_USER: LinuxbrewTestBot
          HOMEBREW_BINTRAY_KEY: ${{secrets.HOMEBREW_BINTRAY_KEY}}
        if: steps.pr.outputs.number != 0
{'fraction_non_alphanumeric': 0.10837765957446809, 'fraction_numerical': 0.004654255319148936, 'mean_word_length': 2.054822335025381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3293889', 'n_tokens_mistral': 942, 'n_tokens_neox': 900, 'n_words': 182}