Locks a GitHub Classroom by removing all students from their team. It keeps track of the students that were removed to allow restoring them later.
This helps us restrict access when students leave our school.
- When removing members from a team, all tasks assigned to them get unassigned.
- Clone this repository
- Run
composer install - Copy
.env.exampleto.envand fill in the values (see #Access Tokens for more info) - Run
php artisan key:generate npm run devto run vite and compile the frontend (watching for changes)php artisan serveto run the server- Open
http://localhost:8000in your browser - Run
php artisan migrateto create the database
- Get a Fine-grained access token from GitHub here.
- Select the
curio-summatieforganization - Select
All repositoriesunder 'Repository access' - Give it the following permissions:
- (Optional) Repository permissions:
- Contents: read
- Organization permissions:
- Members: read and write
- Administration: read and write, for the (un)locking of Projects
- (Optional) Repository permissions:
- Get an OpenAI API key here.
- Copy the key and paste it in the
.envfile asOPENAI_API_KEY. - Make sure you've prepaid some money to your OpenAI account.
To test locally it can be useful to add SD_SSL_VERIFYPEER=no to your .env file. This disables SSL verification, which is not recommended for production.
In order for the frontend to receive the chat output immediately, you need to disable output buffering in PHP. You can do this by setting output_buffering = off in your php.ini file.
Tip
I have no idea why, but if you can't get output buffering to stop, I found that in /etc/apache2/conf-available/php8.1-fpm.conf:
<FilesMatch ".+\.ph(?:ar|p|tml)$">
# SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost"
</FilesMatch>You can comment the SetHandler line to simplify the setup and ensure no other settings are interfering. Please open an issue if you can tell me why this works.