{"id":19710665,"url":"https://github.com/rootstrap/pull_requests_to_slack","last_synced_at":"2025-06-15T13:35:01.092Z","repository":{"id":31537711,"uuid":"128217115","full_name":"rootstrap/pull_requests_to_slack","owner":"rootstrap","description":"Send Github pull request notifications to Slack","archived":false,"fork":false,"pushed_at":"2023-08-19T01:56:01.000Z","size":220,"stargazers_count":21,"open_issues_count":8,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-05T18:51:59.807Z","etag":null,"topics":["bot","github-hooks","hacktoberfest","notifications","pull-requests","ruby","slack"],"latest_commit_sha":null,"homepage":"https://rootstrap.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootstrap.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-05T14:21:12.000Z","updated_at":"2023-01-06T13:42:05.000Z","dependencies_parsed_at":"2023-02-16T22:16:04.108Z","dependency_job_id":null,"html_url":"https://github.com/rootstrap/pull_requests_to_slack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fpull_requests_to_slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fpull_requests_to_slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fpull_requests_to_slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fpull_requests_to_slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootstrap","download_url":"https://codeload.github.com/rootstrap/pull_requests_to_slack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251549212,"owners_count":21607368,"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":["bot","github-hooks","hacktoberfest","notifications","pull-requests","ruby","slack"],"created_at":"2024-11-11T22:08:06.489Z","updated_at":"2025-04-29T17:31:20.250Z","avatar_url":"https://github.com/rootstrap.png","language":"Ruby","readme":"# Rootstrap Pull request to Slack\n\n[![Build Status](https://travis-ci.org/rootstrap/pull_requests_to_slack.svg?branch=master)](https://travis-ci.org/rootstrap/pull_requests_to_slack)\n[![Maintainability](https://api.codeclimate.com/v1/badges/9e5ed337285c4b6f7882/maintainability)](https://codeclimate.com/github/rootstrap/pull_requests_to_slack/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/9e5ed337285c4b6f7882/test_coverage)](https://codeclimate.com/github/rootstrap/pull_requests_to_slack/test_coverage)\n\nSend Github pull request notifications to Slack.\n\n- Each time a PR is created in your organization it will send a message to a specific Slack channel with a link to the PR and its technology emoji assigned.\n- When the PR is merged it will add a merged reaction emoji.\n\u003cimg width=\"459\" alt=\"Screen Shot 2019-08-02 at 11 06 30 AM\" src=\"https://user-images.githubusercontent.com/5280619/62378286-dcd16b80-b51a-11e9-8c31-09c656bb7616.png\"\u003e\n\n\n- You can add ``` \\slack `This is a small pr @slack_user` ``` at the end of the PR's description to add a message to the notification and to notify specific Slack users.\n\u003cimg width=\"748\" alt=\"Screen Shot 2019-08-02 at 11 11 30 AM\" src=\"https://user-images.githubusercontent.com/5280619/62378267-d3480380-b51a-11e9-8b1c-2ff31a30de9d.png\"\u003e\n\n Make sure to use ``` ` ` ``` in the message in case the Slack user name is the same as someone's GitHub name, so the github user is not notified.\n\u003cimg width=\"797\" alt=\"Screen Shot 2019-08-02 at 11 54 58 AM\" src=\"https://user-images.githubusercontent.com/5280619/62379042-806f4b80-b51c-11e9-9aa9-250a41429c08.png\"\u003e\n\n\n- It will not send a notification if the PR is a draft.\n- It will remove the notification if the PR has an `ON HOLD` label and resend the notification when the label is removed.\n\n\n## Installation\n\n1. Clone this repo\n2. Install PostgreSQL in case you don't have it\n3. Create your `database.yml` and `application.yml` files. There are sample files in `/config`\n4. `bundle install`\n5. Generate a secret key with `rake secret` and paste this value into the `application.yml`.\n6. Fill the `SLACK_API_TOKEN` and `SLACK_BOT_TOKEN` in `application.yml`.\nTo get the credentials: log in to https://api.slack.com/apps, select your application and then click OAuth Tokens \u0026 Redirect URLs. `SLACK_API_TOKEN` is the `OAuth Access Token` and `SLACK_BOT_TOKEN` is `Bot User OAuth Access Token`\n6. `rails db:create`\n7. `rails db:migrate`\n8. `rails db:seed`  # this will create an admin with admin@example.com:password\n9. `npm install -g ngrok` Install Ngrok\n10. `rspec` and make sure all tests pass\n11. `rails s`\n12. You are ready!\n\n## How to test the webhook locally?\n- Create a dummy repository in github with a couple branches.\n- Run server:  `rails s -p 3001`\n- In another terminal run ngrok: `ngrok http 3001`\n- Copy ngrok url to github configuration page (settings-\u003ewebhooks)\n`http://xxxxxxx.ngrok.io/api/v1/notifications_filter`\n- Change CHANNEL in SlackNotificationService to your `@name` or `#some_test_channel`\n- Create/edit pull request adding or removing labels. This will execute the webhook.\n\n## ActiveAdmin page\nYou can access the admin page at `http://localhost:3001/admin/users` and add users that you want to ignore\n\n## Deploy to Heroku\nInstall heroku cli https://devcenter.heroku.com/articles/heroku-cli#download-and-install\n* Setup:\n```\nheroku login\nenter credentials\nheroku git:remote -a rootstrap-pull-request-to-slack\n```\n\n* Push:\n```\ngit push heroku master\n```\n\n## Docs\n\n#### Ngrok\nPublic URLs for exposing your local web server\nhttps://ngrok.com/\n\n#### Github Hooks\nInfo about github hooks and Pull request payload\n\nhttps://developer.github.com/webhooks/configuring/\nhttps://developer.github.com/v3/activity/events/types/#pullrequestevent\n\n#### Slack methods\nhttps://api.slack.com/methods\n\n## Contributing\nBug reports (please use Issues) and pull requests are welcome on GitHub at https://github.com/rootstrap/pull_requests_to_slack/issues. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\nThe library is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Credits\nGithub for Slack is maintained by [Rootstrap](http://www.rootstrap.com) with the help of our [contributors](https://github.com/rootstrap/pull_requests_to_slack/contributors).\n\n[\u003cimg src=\"https://s3-us-west-1.amazonaws.com/rootstrap.com/img/rs.png\" width=\"100\"/\u003e](http://www.rootstrap.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Fpull_requests_to_slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootstrap%2Fpull_requests_to_slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Fpull_requests_to_slack/lists"}