Skip to content

Commit

Permalink
Merge pull request #53 from DeterminateSystems/fix-link-info
Browse files Browse the repository at this point in the history
Fix link info values in submitted PRs
  • Loading branch information
lucperkins authored Jun 5, 2024
2 parents bc45b6c + 5547fc0 commit 856a75a
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/update-downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
update-downstream-repos:
if: ${{ github.event.pull_request.merged }}
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' }}
environment: detsys-pr-bot
name: Pull request detsys-ts update to ${{ github.repository_owner }}/${{ matrix.repo }}
runs-on: ubuntu-22.04
Expand All @@ -25,10 +25,10 @@ jobs:
REF_URL: https://github.com/${{ github.repository }}/tree/${{ github.sha }}
SOURCE_REPO: ${{ github.repository }}
SOURCE_PR_NUMBER: ${{ github.event.pull_request.number }}
SOURCE_PR_URL: https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}
HEAD_REF: ${{ github.head_ref }}
HEAD_COMMIT_MSG: ${{ github.event.head_commit.message }}
DIFF_URL: https://github.com/${{ github.repository }}/compare/${{ github.head_ref }}..${{ github.sha }}
SOURCE_PR_URL: ${{ github.event.pull_request.html_url }}
BASE_REF: ${{ github.event.pull_request.base.sha }}
DIFF_URL: https://github.com/${{ github.repository }}/compare/${{ github.event.pull_request.base.sha }}..${{ github.sha }}
DIFF_FILE_URL: ${{ github.event.pull_request.diff_url }}
GIT_USER: ${{ github.actor }}
GIT_EMAIL: ${{ github.actor }}@users.noreply.github.com
GIT_BRANCH: detsys-ts-update-${{ github.sha }}
Expand Down Expand Up @@ -63,18 +63,27 @@ jobs:
nix develop --command pnpm update detsys-ts
nix develop --command pnpm all
- name: Get last commit message
id: commit-msg
run: |
MSG=$(git show -s --format=%s)
echo "msg=${MSG}" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
env:
COMMIT_MSG: ${{ steps.commit-msg.outputs.msg }}
with:
token: ${{ secrets.detsys_pr_bot_token }}
title: "Update `detsys-ts`: ${{ env.HEAD_COMMIT_MSG }}"
commit-message: "Update `detsys-ts` for: `${{ env.HEAD_COMMIT_MSG }}` (`${{ env.REF }}`)"
title: "Update `detsys-ts`: ${{ env.COMMIT_MSG }}"
commit-message: "Update `detsys-ts` for: `${{ env.COMMIT_MSG }}` (`${{ env.REF }}`)"
body: |
Bump [`detsys-ts`](${{ env.SOURCE_REPO }}) to the latest `HEAD` and regenerate application bundle.
* Source ref: [`${{ env.REF }}`](${{ env.REF_URL }})
* Source pull request: [`${{ env.SOURCE_REPO }}#${{ env.SOURCE_PR_NUMBER }}`](${{ env.SOURCE_PR_URL }})
* Source diff: [`${{ env.HEAD_REF }}..${{ env.REF }}`](${{ env.DIFF_URL }})
* Source diff: [`${{ env.BASE_REF }}..${{ env.REF }}`](${{ env.DIFF_URL }})
* Diff file: [`${{ env.SOURCE_PR_NUMBER }}.diff`](${{ env.DIFF_FILE_URL }})
push-to-fork: detsys-pr-bot/${{ matrix.repo }}
branch: "${{ env.GIT_BRANCH }}"
base: ${{ env.GIT_BASE }}
Expand Down

0 comments on commit 856a75a

Please sign in to comment.