|
9 | 9 | types: |
10 | 10 | - closed |
11 | 11 |
|
12 | | -env: |
13 | | - TERM: dumb |
14 | 12 | jobs: |
15 | 13 | if_merged: |
16 | | - if: github.event.pull_request.merged == true |
17 | | - runs-on: ubuntu-latest |
18 | | - env: |
19 | | - GH_TOKEN: ${{ secrets.GH_PR_PAT }} |
20 | | - # Escape the PR title. See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable for details |
21 | | - PR_TITLE: ${{ github.event.pull_request.title }} |
22 | | - steps: |
23 | | - - uses: actions/checkout@v4 |
24 | | - with: |
25 | | - # This is necessary to avoid unexpected auto-merge in git cherry-pick |
26 | | - fetch-depth: 0 |
27 | | - # This is necessary for git-push |
28 | | - token: ${{ secrets.GH_PR_PAT }} |
29 | | - |
30 | | - - name: Create pull requests |
31 | | - run: | |
32 | | - assignee=$(ci/auto-pr/fetch_gh_user_info "${{ github.event.repository.owner.login }}" "${{ github.event.repository.name }}" "${{ github.event.pull_request.user.login }}") |
33 | | - echo ------------- |
34 | | - echo "assignee: $assignee" |
35 | | - echo ------------- |
36 | | - if [[ -z $assignee ]]; then |
37 | | - # For instance, we can't assign `debendabot` to a new PR. |
38 | | - new_pr_assignee="${{ github.event.pull_request.merged_by.login }}" |
39 | | - else |
40 | | - new_pr_assignee="${{ github.event.pull_request.user.login }}" |
41 | | - fi |
42 | | -
|
43 | | - versions=$(ci/auto-pr/fetch_gh_proj_versions "${{ github.event.repository.owner.login }}" "${{ github.event.repository.name }}" "${{ github.event.number }}") |
44 | | - echo ------------- |
45 | | - echo "versions: $versions" |
46 | | - echo ------------- |
47 | | -
|
48 | | - branches=$(ci/auto-pr/conv_proj_version_to_branch $versions) |
49 | | - # Remove the base branch from the list because the target change is already merged to the branch. |
50 | | - branches=$(echo "$branches" | sed "/^${{ github.base_ref }}$/d") |
51 | | - echo ------------- |
52 | | - echo "branches: $branches" |
53 | | - echo ------------- |
54 | | -
|
55 | | - ci/auto-pr/create_pull_requests \ |
56 | | - "${{ github.event.number }}" \ |
57 | | - "${{ github.event.pull_request.html_url }}" \ |
58 | | - "$PR_TITLE" \ |
59 | | - "${{ github.sha }}" \ |
60 | | - "$new_pr_assignee" \ |
61 | | - $branches |
| 14 | + uses: scalar-labs/actions/.github/workflows/auto-pr-reusable.yaml@main |
| 15 | + secrets: inherit |
| 16 | + with: |
| 17 | + project_base_name: "ScalarDB" |
62 | 18 |
|
0 commit comments