https://github.com/markpatterson27/github-classroom-prepopulate-issues
Workflow file that prepopulates an assignment repository with issues when a student accepts the assignment.
https://github.com/markpatterson27/github-classroom-prepopulate-issues
Last synced: about 1 year ago
JSON representation
Workflow file that prepopulates an assignment repository with issues when a student accepts the assignment.
- Host: GitHub
- URL: https://github.com/markpatterson27/github-classroom-prepopulate-issues
- Owner: markpatterson27
- License: mit
- Created: 2021-07-01T12:45:20.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-25T14:15:55.000Z (almost 5 years ago)
- Last Synced: 2025-01-27T09:09:23.452Z (over 1 year ago)
- Size: 8.79 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Classroom - Prepopulate Issues
## Action Version
I made an action of the workflow in this repo: https://github.com/markpatterson27/create-issues.
You can achieve the same result as the workflow based solution, using the action and a workflow with the following contents:
```yaml
name: Create Issues
on:
create:
jobs:
create:
name: Create project and issues
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/feedback' }}
steps:
- uses: actions/checkout@v2
- name: Create issues
uses: markpatterson27/create-issues@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
project-name: Assignment Tasks
project-description: Complete the tasks outlined in each issue.
issues-directory: .github/STARTING_ISSUES
```
## Old Workflow Based Version
Workflow file that prepopulates an assignment repository with issues when a student accepts the assignment.
Requirements:
- The workflow file is intended to be used with [GitHub Classroom](https://classroom.github.com) assignments.
- Feedback pull request needs to be enabled for the assignment.
**Note:** the workflow makes use of the [Project API](https://docs.github.com/en/rest/reference/projects), which is currently in preview stage and subject to change. It is possible that by the time you read this, the API has changed and the workflow is broken.
## How to use
1. Copy the `.github/workflows/prepopulate-issues.yml` file to your assignment repository's workflow directory.
2. For each issue you want to create, add a text file to the `.github/STARTING_ISSUES` directory. The filename of each file will become the issue title and the contents of the file will be the issue's body.
## What the workflow does
- The workflow runs when the `feedback` branch is created.
- The workflow creates a Project called "Assignment Tasks" and a column called "To Do".
- The workflow then iterates through the files in the `.github/STARTING_ISSUES` directory, creating an issue per file and adding that issue to the "To Do" column in the project.