2017-02-27 6 views
1

特定のディレクトリの下のファイルにアクセスしたプルリクエストのリストを取得できますか?GitHubの特定のファイル/ディレクトリパスに関連するすべてのプルリクエストのリストを取得できますか?

先日、私は過去数ヶ月から数十回のプルリクエストを受け取り、関心のある特定の経路の下でファイルに触れたすべてのものを収集しなければなりませんでした。

私はGitHubのファイルパスを使ってPRを検索しようとしましたが、ファイルパスが索引付けされたようではありませんでした。もう少し詳しく調べると、プルリクエストでファイルを検索するソリューションを見つけることができませんでした。これは驚くべきことでした。最終的には、さまざまなディレクトリのコミットの歴史を経て、関連するPRを収集する必要がありましたが、かなり面倒でした。

GitHubの影響を受けるファイルのPRを要約するサポートはありますか?おそらく、これはAPIが可能なものですか?

+0

http://stackoverflow.com/a/26870440/4280359 –

答えて

1
git log --merges --first-parent -- <file> 

は、特定のファイルの変更をマージしたものを表示します。ファイルをマージするためにPRを使用するので、これで十分です。

これは、しかし、そうではない、とあなたは追加のマージがPR用のではありませんメインラインにコミットしている、あなたはさらに出力をフィルタリングする--author=<pattern>--committer=<pattern>の組み合わせを使用する必要がある、と--grep=<pattern>フラグ可能性がある場合:

--author=<pattern>, --committer=<pattern> 
     Limit the commits output to ones with author/committer header lines that match 
     the specified pattern (regular expression). With more than one 
     --author=<pattern>, commits whose author matches any of the given patterns are 
     chosen (similarly for multiple --committer=<pattern>). 

    --grep=<pattern> 
     Limit the commits output to ones with log message that matches the specified 
     pattern (regular expression). With more than one --grep=<pattern>, commits whose 
     message matches any of the given patterns are chosen (but see --all-match). 

     When --show-notes is in effect, the message from the notes is matched as if it 
     were part of the log message. 
関連する問題