{"id":49402445,"url":"https://github.com/peergramming/learning-bot","last_synced_at":"2026-04-28T19:01:07.786Z","repository":{"id":239127342,"uuid":"249954791","full_name":"peergramming/learning-bot","owner":"peergramming","description":"A GitLab bot for providing programming advice from code repair tools.","archived":false,"fork":false,"pushed_at":"2020-03-25T11:10:00.000Z","size":202,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-10T07:32:55.254Z","etag":null,"topics":["gitlab","gitlab-bot","peer-programming","static-code-analysis"],"latest_commit_sha":null,"homepage":"https://humaidq.ae/projects/learning-bot/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peergramming.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-25T10:59:52.000Z","updated_at":"2024-06-19T07:48:10.013Z","dependencies_parsed_at":null,"dependency_job_id":"b273a7f3-44d8-4f14-9909-8b2eba6ae51b","html_url":"https://github.com/peergramming/learning-bot","commit_stats":null,"previous_names":["peergramming/learning-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peergramming/learning-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peergramming%2Flearning-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peergramming%2Flearning-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peergramming%2Flearning-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peergramming%2Flearning-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peergramming","download_url":"https://codeload.github.com/peergramming/learning-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peergramming%2Flearning-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32394478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gitlab","gitlab-bot","peer-programming","static-code-analysis"],"created_at":"2026-04-28T19:00:39.614Z","updated_at":"2026-04-28T19:01:07.775Z","avatar_url":"https://github.com/peergramming.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning bot\n\n## Purpose\n\nThe aim of this project is to create a GitLab bot which would download\nstudents code and generate a report containing advice on repairing\nissues found in the source code.  \n\n### Plan\n\nCurrently, the plan is to use [checkstyle] to list issues in the code,\nwhich is parsed by this program, detecting which type of error it is\nand on which line and file.  \n\nThen an issue will be created on the project's issue tracker with a\nlink to the report. The report would contain a list of all the issues\nin the source code, each of which would give a preview of the code and\na suggestion on how to fix it.\n\nAlternatively, a CI-based add-on would be built into GitLab which would\nadd a badge to each commit, which would redirect to the report page.\n\n## Requirements\n\nThe following packages must be installed on your system.\n\n- git\n- Go *(tested with 1.12)*\n- GNU make\n- OpenJDK Runtime Environment *(tested with 1.8.0)*\n- unzip *(Unix utility)*\n- checkstyle *(jar, tested with 8.22)*\n\nThe program supports MySQL, but it is optional requirement as an SQLite\noption is available. No additional packages are needed to be installed for\ndatabase functionality.\n\n## Installation from source\n\n### Downloading\n```\n$ git clone https://github.com/peergramming/learning-bot.git\n$ cd learning-bot\n$ make clean all\n```\n\n**Note:** You have to run the binary in the directory, so the program\nis able to find web files required to render the web pages.\n\n### Configuring\n\nBefore running the web server, the program has to be configured using\nthe `config` command-line option.\n\n```\n$ ./learning-bot config\n```\n\nThe program will guide you through the process on creating a new configuration\nfile. You'll have to specify the SQL driver/server, checkstyle jar and configuration\nlocation, bot private token, and so on...  \n\nOnce configured, the program would generate a `config.toml` file (which can be later\nedited, if required).\n\n#### Adding projects to check\n\nThe bot will not check any projects by default, but it can be added using the interactive\n`manage` tool. This can be automated with scripts by using the add and\nremove subcommands:\n\n```\n$ learning-bot manage [add/remove] [project]\n```\n\nThe project consists of the user and project name separated with a slash, such as\n`humaid/dsa-cw-1`. The projects list is stored in the `active-projects.toml` file.\n\n### Running the bot\n\nThe bot can be run using the following command, this would also start a web server \nto display reports (unless if you start it with `--no-web`).\n\n```\n$ ./learning-bot run\n```\n\nBy default, the bot would automatically check all active repositories at start, and\nit would repeat on interval as configured.\n\n## Further configuration\n\nThere are some default configuration values which aren't setup in the wizard. Here\nis the documentation for `config.toml`.\n\n- `site_title`: Title of the website and bot.\n- `site_url`: The URL of the bot website, including port, used in issue tracker link.\n- `bot_private_access_token`: Bot account's private access token.\n- `checkstyle_jar_path`: Path for the checkstyle JAR file, must be downloaded separately.\n- `checkstyle_config_path`: Path for the checkstyle configuration file, provided by the project.\n- `gitlab_instance_url`: The URL of the GitLab instance for the API, links and integration.\n- `gitlab_skip_verify_check`: Skip verification with authenticating with GitLab API via HTTPS.\n- `lms_title`: Optional LMS link title.\n- `lms_url`: Optional LMS link URL.\n- `check_active_repositories_cron`: Cron job schedule interval. Learn more about format [here](https://godoc.org/github.com/robfig/cron#hdr-Predefined_schedules).\n- `timezone`: Timezone used for report and database.\n- `code_snippet_include_previous_lines`: Maximum number of lines to include before troubled line in report code snippet.\n- `database`: Database configuration field.\n  - `type`: Driver type; 0 for SQLite, 1 for MySQL.\n  - `host`: [MySQL] The host of the MySQL server.\n  - `name`: [MySQL] The name of the MySQL user.\n  - `ssl_mode`: [MySQL] The SSL/TLS mode of the MySQL connection.\n  - `path`: [SQLite] The path for the SQLite database file.\n- `limits`: Limitations configuration field.\n  - `max_check_workers`: Maximum number of concurrent workers checking repositories.\n  - `max_issues_per_report`: Maximum number of issues per report (-1 for no limit).\n  - `max_issues_per_type_per_report`: Maximum number of issues per type in a report (-1 for no limit).\n\n\n\n[checkstyle]: https://checkstyle.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeergramming%2Flearning-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeergramming%2Flearning-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeergramming%2Flearning-bot/lists"}