git - Travis CI How to get only changed files?
phpcn_u1582
phpcn_u1582 2017-05-02 09:43:15
0
2
790

Hi, when I was maintaining staticfile, I came up with this need: I need to verify whether the PR submitted by others meets the specifications

But staticfle is a very large library. If you have to git clone every PR and submission, it will generate a lot of unnecessary traffic. Is there any way to obtain the updated files in this PR?

For example, a PR like this: https://github.com/staticfile...

I need to verify whether the package.json he submitted complies with the regulations and whether the files are placed in a place that complies with the rules.

phpcn_u1582
phpcn_u1582

reply all(2)
淡淡烟草味

This is an interesting question. I checked the Github API and found that there is such an API: List pull requests files.

I think you can try to call this API to get the PR updated file. Whether it is placed in a place that meets the rules, you can directly judge from the file URL. And whether the file meets the specifications, you can directly access the file content through the URL. check.

PHPzhong

Can I add it to the cache and then go to the directory to perform a pull?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template