Bin
2025-12-16 971a2a12c03b74dd2d7d668b9dbc599f5131bcaf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Update PIP dependency
 
on:
  repository_dispatch:
    types:
      - upstream_pip_dependency_update
 
concurrency:
  group: ${{ github.workflow }}-${{ github.event.client_payload.branch_name || 'schedule' }}
 
env:
  POETRY_VERSION: 2.1.4
 
jobs:
  open:
    name: Sync PR
    runs-on: ubuntu-latest
    steps:
      - uses: hmarr/debug-action@v3.0.0
 
      - name: Checkout
        uses: actions/checkout@v6
        with:
          token: ${{ secrets.GIT_PAT }}
          ref: ${{ github.event.repository.default_branch }}
 
      - name: Configure git
        shell: bash
        run: |
          set -xeuo pipefail
          git config --global user.name 'robot-ci-heartex'
          git config --global user.email 'robot-ci-heartex@users.noreply.github.com'
 
      - name: "Install poetry"
        run: pipx install "poetry==${{ env.POETRY_VERSION }}"
 
      - name: "Set up Python"
        id: setup_python
        uses: actions/setup-python@v6
        with:
          python-version: '3.13'
          cache: 'poetry'
 
      - name: Commit version files to 'develop'
        id: make-develop-commit
        run: |
          set -euo pipefail
 
          git checkout develop
 
          branch='fb-bump-${{ github.event.client_payload.dependency_name }}-version-${{ github.event.client_payload.version }}'
          echo "branch=${branch}" >> $GITHUB_OUTPUT
          git checkout -b "${branch}"
 
          poetry add "${{ github.event.client_payload.dependency_name }}==${{ github.event.client_payload.version }}" --lock
 
          git add -A
          git commit -m "chore: Bump ${{ github.event.client_payload.dependency_name }} version to ${{ github.event.client_payload.version }}" -m 'Workflow run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
 
          echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
          git push origin HEAD:refs/heads/${branch}
 
      - name: Create PR to 'develop'
        uses: actions/github-script@v8
        id: create-pr
        with:
          github-token: ${{ secrets.GIT_PAT }}
          script: |
            const {repo, owner} = context.repo;
            const createPullResponse = await github.rest.pulls.create({
              title: 'chore: Bump ${{ github.event.client_payload.dependency_name }} version to ${{ github.event.client_payload.version }}',
              owner,
              repo,
              head: '${{ steps.make-develop-commit.outputs.branch }}',
              base: 'develop',
              body: [
                'Hi @${{ github.actor }}!',
                '',
                'This PR was created in response to a manual trigger of the release workflow here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}.',
              ].join('\n')
            });
            github.rest.pulls.requestReviewers({
              owner,
              repo,
              pull_number: createPullResponse.data.number,
               reviewers: [ '${{ github.actor }}' ]
            });
            return createPullResponse