List all files changed in a pull request in Git/GitHub

前端 未结 6 1727
执念已碎
执念已碎 2020-12-29 04:58

Is there a way (from the command line) to list the names of all files changed in a PR in Git/GitHub? This would be used to find what tests need to be run in a Travis CI buil

6条回答
  •  一整个雨季
    2020-12-29 05:41

    I couldn't find a way to see just the list of changed files in GitHub (i.e. without the diff and comments), but it can be done with this one-liner in the browser console:

    Array.from(document.getElementsByClassName('js-details-target')).forEach((e) => {e.click();})
    

    This will collapse all the diff blocks leaving only the filenames.

提交回复
热议问题