mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Summary:
Modify _check_output to capture `CalledProcessError` and add
stdout/stderr to the failure message
Also record github actions run id in the failure message (calculated based on `${{ github.run_id}}`)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71941
Reviewed By: seemethere
Differential Revision: D33829633
Pulled By: malfet
fbshipit-source-id: 060b2856ca6c71574075effa72b982f9e1d64e6e
(cherry picked from commit a9ad7df9b540f9ab14524a644cab5e06225debe4)
32 lines
948 B
YAML
32 lines
948 B
YAML
name: Revert merged PR
|
|
|
|
on:
|
|
repository_dispatch:
|
|
types: [try-revert]
|
|
|
|
jobs:
|
|
do_revert:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
architecture: x64
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.MERGEBOT_TOKEN }}
|
|
|
|
- name: Setup committer id
|
|
run: |
|
|
git config --global user.email "pytorchmergebot@users.noreply.github.com"
|
|
git config --global user.name "PyTorch MergeBot"
|
|
- name: Revert PR
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.MERGEBOT_TOKEN }}
|
|
PR_NUM: ${{ github.event.client_payload.pr_num }}
|
|
GH_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
run: |
|
|
python3 .github/scripts/trymerge.py --revert "${PR_NUM}"
|