Skip to content

Commit 3bec49e

Browse files
committed
adding code search api
1 parent 780dd31 commit 3bec49e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

gh-cli/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ Retrieves the ID of a user for other GraphQL calls
213213

214214
Renaming a repo
215215

216+
## search-org-for-code.sh
217+
218+
Code search in an organization.
219+
220+
See the [docs](https://docs.github.com/en/rest/search?apiVersion=2022-11-28#search-code) and [StackOverflow](https://stackoverflow.com/questions/24132790/how-to-search-for-code-in-github-with-github-api) for more information.
221+
216222
## set-ip-allow-list-setting.sh
217223

218224
Sets the IP allow list to enabled/disable for an enterprise or organization. You can't enable the IP allow list unless the IP running the script is in the list.

gh-cli/search-org-for-code.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
# This is an example of searching an org for the deprecated `save-output` workflow command
4+
5+
gh api --paginate "/search/code?q=set-output+language:yaml+org:joshjohanning-org" --jq '.items[].html_url'

0 commit comments

Comments
 (0)