A Google Apps Script library to create and update GitHub issues using data from a Google Sheet.
- Create new GitHub issues from Google Sheet rows
- Update existing GitHub issues using issue IDs stored in the Google Sheet
GitHub
: A simple GitHub API wrapper for creating and updating issuesGoogleSheet
: A Google Sheet wrapper for fetching data and updating cells
-
Create a new Google Apps Script project and paste the code from the provided JavaScript file.
-
Replace the following placeholders with your own values:
<YOUR_GITHUB_ACCESS_TOKEN>
: Your GitHub personal access token. Learn how to create one hereyour/repo
: The repository where you want to create or update issues (e.g.,username/repository
)<YOUR_SPREADSHEET_ID>
: The ID of the Google Sheet containing the data (found in the sheet's URL)<YOUR_SHEET_NAME>
: The name of the sheet within the Google Sheet containing the data
-
In the Google Sheet, create columns for "Title", "Description", and "Issue ID". Add your issue data to the sheet, and leave the "Issue ID" column empty for new issues.
-
Run the
createOrUpdateIssues()
function in the Google Apps Script editor. The script will create new issues for rows with an empty "Issue ID" column and update existing issues for rows with an "Issue ID" value.
- The
createOrUpdateIssues()
function assumes the first row in the sheet contains headers and starts processing data from the second row. - The code uses the GitHub REST API v3. For more information, visit the GitHub REST API documentation.
This project is licensed under the MIT License - see the LICENSE file for details.