Skip to content

Commit

Permalink
Add GitHub query
Browse files Browse the repository at this point in the history
  • Loading branch information
gbraad committed Mar 6, 2023
1 parent cb2c5a8 commit a9222a0
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions API/github.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# GitHub"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### Pre-requisites"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install PyGithub"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### Query"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from github import Github\n",
"import os\n",
"from pprint import pprint\n",
"\n",
"#token = os.getenv('GITHUB_TOKEN', '...')\n",
"g = Github()\n",
"repo = g.get_repo(\"crc-org/crc\")\n",
"issues = repo.get_issues(state=\"open\")\n",
"pprint(issues.get_page(0))"
]
}
],
"metadata": {
"language_info": {
"name": "python"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit a9222a0

Please sign in to comment.