Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: github script fix repo #1012

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/test_mathlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@ jobs:
steps:
- name: Checkout PR
uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository }}
ref: ${{github.event.workflow_run.head_branch }}
fetch-depth: 0

- name: Get PR info
id: pr-info
run: |
echo "pullRequestNumber=$(gh pr view --json number -q .number || echo '')" >> $GITHUB_OUTPUT
echo "targetBranch=$(gh pr view --json baseRefName -q .baseRefName || echo '')" >> $GITHUB_OUTPUT
echo "HEAD_BRANCH=$(gh pr view --json headRefName -q .headRefName || echo '')" >> $GITHUB_ENV
echo "HEAD_REPO=$(gh pr view --json headRepository -q .headRepository.name || echo '')" >> $GITHUB_ENV
echo "HEAD_OWNER=$(gh pr view --json headRepositoryOwner-q .headRepositoryOwner.login || echo '')" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -45,13 +52,14 @@ jobs:
id: check_mathlib_tag
env:
PR_NUMBER: ${{ steps.pr-info.outputs.pullRequestNumber }}
HEAD_OWNER: ${{ env.HEAD_OWNER }}
HEAD_REPO: ${{ env.HEAD_REPO }}
HEAD_BRANCH: ${{ env.HEAD_BRANCH }}
run: |
git config user.name "leanprover-community-mathlib4-bot"
git config user.email "leanprover-community-mathlib4-bot@users.noreply.github.com"

echo "PR info: $HEAD_REPO $HEAD_BRANCH"
echo "PR info: $HEAD_OWNER $HEAD_REPO $HEAD_BRANCH"

BASE=master
echo "Using base tag: $BASE"
Expand Down