зеркало из https://github.com/github/ruby.git
Use `--depth` on pull request
`--shallow-since=yesterday` for COMMIT_NUMBER_OF_DAY of `tool/actions-commit-info.sh`. COMMIT_NUMBER_OF_DAY is mainly for master branch. And `--shallow-since=yesterday` may fail on pull request. So this revert to `--depth` on pull request.
This commit is contained in:
Родитель
f2807f4ec0
Коммит
7a2177ea50
|
@ -21,7 +21,7 @@ jobs:
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
- name: Checkout a pull request
|
- name: Checkout a pull request
|
||||||
run: |
|
run: |
|
||||||
git clone --single-branch --shallow-since=yesterday --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
|
git clone --single-branch --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
|
||||||
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
|
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
- run: ./src/tool/actions-commit-info.sh
|
- run: ./src/tool/actions-commit-info.sh
|
||||||
|
|
|
@ -39,7 +39,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Checkout a pull request
|
- name: Checkout a pull request
|
||||||
run: |
|
run: |
|
||||||
git clone --single-branch --shallow-since=yesterday --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
|
git clone --single-branch --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
|
||||||
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
|
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
- run: ./src/tool/actions-commit-info.sh
|
- run: ./src/tool/actions-commit-info.sh
|
||||||
|
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
- name: Checkout a pull request
|
- name: Checkout a pull request
|
||||||
run: |
|
run: |
|
||||||
git clone --single-branch --shallow-since=yesterday --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
|
git clone --single-branch --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
|
||||||
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
|
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
- run: ./src/tool/actions-commit-info.sh
|
- run: ./src/tool/actions-commit-info.sh
|
||||||
|
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
- name: Checkout a pull request
|
- name: Checkout a pull request
|
||||||
run: |
|
run: |
|
||||||
git clone --single-branch --shallow-since=yesterday --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
|
git clone --single-branch --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
|
||||||
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
|
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
- run: ./src/tool/actions-commit-info.sh
|
- run: ./src/tool/actions-commit-info.sh
|
||||||
|
|
|
@ -40,7 +40,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Checkout a pull request
|
- name: Checkout a pull request
|
||||||
run: |
|
run: |
|
||||||
git clone --single-branch --shallow-since=yesterday --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
|
git clone --single-branch --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
|
||||||
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
|
git -C src reset --hard ${{ github.event.pull_request.head.sha }}
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
- run: ./src/tool/actions-commit-info.sh
|
- run: ./src/tool/actions-commit-info.sh
|
||||||
|
|
Загрузка…
Ссылка в новой задаче