{"id":15199960,"url":"https://github.com/jekyll/jekyllbot","last_synced_at":"2025-10-19T11:30:53.446Z","repository":{"id":37363788,"uuid":"182845531","full_name":"jekyll/jekyllbot","owner":"jekyll","description":"The code that runs @jekyllbot","archived":false,"fork":false,"pushed_at":"2025-01-06T18:51:06.000Z","size":3544,"stargazers_count":9,"open_issues_count":3,"forks_count":4,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-29T13:04:15.550Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jekyll.png","metadata":{"files":{"readme":"README.md","changelog":"History.markdown","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":"2019-04-22T18:33:41.000Z","updated_at":"2025-01-19T11:29:06.000Z","dependencies_parsed_at":"2023-12-20T14:35:17.650Z","dependency_job_id":"ad0650ca-b3d8-4eb3-aeb0-4be7e1c103c9","html_url":"https://github.com/jekyll/jekyllbot","commit_stats":{"total_commits":415,"total_committers":10,"mean_commits":41.5,"dds":0.1325301204819277,"last_synced_commit":"f12eaf6b25f9a548ddb5db3ba0dfb582668e9c7d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jekyll%2Fjekyllbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jekyll%2Fjekyllbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jekyll%2Fjekyllbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jekyll%2Fjekyllbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jekyll","download_url":"https://codeload.github.com/jekyll/jekyllbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237116764,"owners_count":19258308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-09-28T02:22:47.917Z","updated_at":"2025-10-19T11:30:53.076Z","avatar_url":"https://github.com/jekyll.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# auto-reply\n\nAn open source gardener. This is a technology for powering GitHub bots. It's really rough around the edges but it currently powers [@jekyllbot](https://github.com/jekyllbot).\n\n[![Build Status](https://travis-ci.org/parkr/auto-reply.svg?branch=master)](https://travis-ci.org/parkr/auto-reply)\n\n## Configuring\n\nIf you want to configure a secret to validate your payload from GitHub,\nthen set it as the environment variable `GITHUB_WEBHOOK_SECRET`. This is\nthe same value you enter in the web interface when setting up the \"Secret\"\nfor your webhook.\n\nI could use [your thoughts on this!](https://github.com/jekyll/jekyllbot/issues/4) Currently, it's a hodge-podge. The documentation for each package will provide more details on this. Currently we have the following packages, with varying levels of configuration:\n\n- `affinity` – assigns issues based on team mentions and those team captains. See [Jekyll's docs for more info.](https://github.com/jekyll/jekyll/blob/master/docs/affinity-team-captain.md)\n- `autopull` – detects pushes to branches which start with `pull/` and automatically creates a PR for them\n- `chlog` – creates GitHub releases when a new tag is pushed, and powers \"@jekyllbot: merge (+category)\"\n- `jekyll/deprecate` – comments on and closes issues to issues on certain repos with a per-repo stock message\n- `jekyll/issuecomment` – provides handlers for removing `pending-feedback` and `stale` labels when a comment comes through\n- `labeler` – removes `pending-rebase` label when a PR is pushed to and is mergeable (and helper functions for manipulating labels)\n- `lgtm` – adds a `jekyllbot/lgtm` CI status and handles `LGTM` counting\n\n## Installing\n\nThis is intended for use with servers, so you'd do something like:\n\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/jekyll/jekyllbot/affinity\"\n\t\"github.com/jekyll/jekyllbot/ctx\"\n\t\"github.com/jekyll/jekyllbot/hooks\"\n)\n\nvar context *ctx.Context\n\nfunc main() {\n\tvar port string\n\tflag.StringVar(\u0026port, \"port\", \"8080\", \"The port to serve to\")\n\tflag.Parse()\n\tcontext = ctx.NewDefaultContext()\n\n\thttp.HandleFunc(\"/_ping\", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tw.Header().Set(\"Content-Type\", \"text/plain\")\n\t\tw.Write([]byte(\"ok\\n\"))\n\t}))\n\n\t// Add your event handlers. Check out the documentation for the\n\t// github.com/jekyll/jekyllbot/hooks package to see all supported events.\n\teventHandlers := hooks.EventHandlerMap{}\n\n\t// Build the affinity handler.\n\taff := \u0026affinity.Handler{}\n\taff.AddRepo(\"myorg\", \"myproject\")\n\taff.AddTeam(context, 123) // @myorg/performance\n\taff.AddTeam(context, 456) // @myorg/documentation\n\n\t// Add the affinity handler's various event handlers to the event handlers map :)\n\teventHandlers.AddHandler(hooks.IssuesEvent, aff.AssignIssueToAffinityTeamCaptain)\n\teventHandlers.AddHandler(hooks.IssueCommentEvent, aff.AssignIssueToAffinityTeamCaptainFromComment)\n\teventHandlers.AddHandler(hooks.PullRequestEvent, aff.RequestReviewFromAffinityTeamCaptain)\n\n\t// Create the webhook handler. GlobalHandler takes the list of event handlers from\n\t// its configuration and fires each of them based on the X-GitHub-Event header from\n\t// the webhook payload.\n\tmyOrgHandler := \u0026hooks.GlobalHandler{\n\t\tContext:       context,\n\t\tEventHandlers: eventHandlers,\n\t}\n\thttp.Handle(\"/_github/myproject\", myOrgHandler)\n\n\tlog.Printf(\"Listening on :%s\", port)\n\tlog.Fatal(http.ListenAndServe(\":\"+port, nil))\n}\n```\n\n## Writing Custom Handlers\n\nFor now, all you have to do is write a function which satisfies the `hooks.EventHandler` type. At the moment, each handler can accept only **one** type of event. If you want to accept the `issue_comment` event, then you should be able to perform a successful type assertion:\n\n```go\nfunc MyIssueCommentHandler(context *ctx.Context, payload interface{}) error {\n    event, err := payload.(*github.IssueCommentEvent)\n    if err != nil {\n        return context.NewError(\"MyIssueCommentHandler: hm, didn't get an IssueCommentEvent: %v\", err)\n    }\n\n    // Handle your issue comment event in a type-safe way here.\n}\n```\n\nThen you register that with your project. Taking the two examples above, you'd add `MyIssueCommentHandler` to the `eventHandlers[hooks.IssueCommentEvent]` array:\n\n```go\neventHandlers := hooks.EventHandlerMap{}\neventHandlers.AddHandler(hooks.IssueCommentEvent, MyIssueCommentHandler)\n```\n\nAnd it should work!\n\n## Optional: Mark-and-sweep Stale Issues\n\nOne big issue we have in Jekyll is \"stale\" issues, that is, issues which were opened and abandoned after a few months of activity. The code in `cmd/mark-and-sweep-stale-issues` is still Jekyll-specific but I'd love a PR which abstracts out the configuration into a file or something!\n\n## License\n\nThis code is licensed under BSD 3-clause as specified in the [LICENSE](LICENSE) file in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjekyll%2Fjekyllbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjekyll%2Fjekyllbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjekyll%2Fjekyllbot/lists"}