할 수 있습니다 얻을 하나의 GET /repos/:owner/:repo/commits/:sha
를 사용하여 커밋하고 당신이 그것을 예를 들어이 단순 목록으로 수정 된 파일을 인쇄합니다, jq
를 사용하여 처리 할 수 있지만 중요한 단서가있다
curl -s https://api.github.com/ENDPOINT | jq -r '.files | .[] | select(.status == "modified") | .filename'
을이 필터 커밋의 전체 내용을 포함하는 GET 쿼리의 결과. 많은 양의 데이터가 될 수 있습니다. 그게 너에게 중요한 일인지 모르겠다. 불필요한 대역폭을 사용하지 않도록 반환 된 필드를 필터링하는 방법을 찾았지만 API에서 찾을 수 없습니다.
이 같은 JSON 형식으로, 그것에 관심이 있다면 당신은 더 자세한 정보를 얻을 수 :
는
curl -s https://api.github.com/ENDPOINT | jq '[.files | .[] | select(.status == "modified")]'
이 같은 출력을 생성합니다 :
[
{
"sha": "564324525eb706f7cc2756ceef8b82cdfeaf270c",
"filename": "README.md",
"status": "modified",
"additions": 1,
"deletions": 0,
"changes": 1,
"blob_url": "https://github.com/janosgyerik/test1/blob/41885b6c8183de3ab5be02884fdcc37d920e41b9/README.md",
"raw_url": "https://github.com/janosgyerik/test1/raw/41885b6c8183de3ab5be02884fdcc37d920e41b9/README.md",
"contents_url": "https://api.github.com/repos/janosgyerik/test1/contents/README.md?ref=41885b6c8183de3ab5be02884fdcc37d920e41b9",
"patch": "@@ -1,3 +1,4 @@\n test1\n =====\n nothing special\n+Sat May 13 00:16:02 CEST 2017"
},
{
"sha": "37a26e04e6bdc55935e00f2a092d936240771aca",
"filename": "index.html",
"status": "modified",
"additions": 1,
"deletions": 0,
"changes": 1,
"blob_url": "https://github.com/janosgyerik/test1/blob/41885b6c8183de3ab5be02884fdcc37d920e41b9/index.html",
"raw_url": "https://github.com/janosgyerik/test1/raw/41885b6c8183de3ab5be02884fdcc37d920e41b9/index.html",
"contents_url": "https://api.github.com/repos/janosgyerik/test1/contents/index.html?ref=41885b6c8183de3ab5be02884fdcc37d920e41b9",
"patch": "@@ -55,3 +55,4 @@\n </div>\n </body>\n </html>\n+"
}
]
덕분에 많이, 체크 아웃한다 내 경우에는 대역폭에 어떤 영향을 미치는지. – Nitin