A Slack Bot that pulls Pixiv information and posts the full image(s) into Slack, with iOS shortcuts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
3.3 KiB

  1. # Contributing to SlackMathbot
  2. This project is work of [many contributors](https://github.com/dblock/slack-mathbot/graphs/contributors).
  3. You're encouraged to submit [pull requests](https://github.com/dblock/slack-mathbot/pulls), [propose features and discuss issues](https://github.com/dblock/slack-mathbot/issues).
  4. In the examples below, substitute your Github username for `contributor` in URLs.
  5. ## Fork the Project
  6. Fork the [project on Github](https://github.com/dblock/slack-mathbot) and check out your copy.
  7. ```
  8. git clone https://github.com/contributor/slack-mathbot.git
  9. cd slack-mathbot
  10. git remote add upstream https://github.com/dblock/slack-mathbot.git
  11. ```
  12. ## Create a Topic Branch
  13. Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
  14. ```
  15. git checkout master
  16. git pull upstream master
  17. git checkout -b my-feature-branch
  18. ```
  19. ## Bundle Install and Test
  20. Ensure that you can build the project and run tests.
  21. ```
  22. bundle install
  23. bundle exec rake
  24. ```
  25. ## Write Tests
  26. Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build.
  27. Add to [spec](spec).
  28. We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
  29. ## Write Code
  30. Implement your feature or bug fix.
  31. Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop).
  32. Run `bundle exec rubocop` and fix any style issues highlighted.
  33. Make sure that `bundle exec rake` completes without errors.
  34. ## Write Documentation
  35. Document any external behavior in the [README](README.md).
  36. ## Update Changelog
  37. Add a line to [CHANGELOG](CHANGELOG.md) under *Next Release*.
  38. Make it look like every other line, including your name and link to your Github account.
  39. ## Commit Changes
  40. Make sure git knows your name and email address:
  41. ```
  42. git config --global user.name "Your Name"
  43. git config --global user.email "contributor@example.com"
  44. ```
  45. Writing good commit logs is important. A commit log should describe what changed and why.
  46. ```
  47. git add ...
  48. git commit
  49. ```
  50. ## Push
  51. ```
  52. git push origin my-feature-branch
  53. ```
  54. ## Make a Pull Request
  55. Go to https://github.com/contributor/slack-mathbot and select your feature branch.
  56. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
  57. ## Rebase
  58. If you've been working on a change for a while, rebase with upstream/master.
  59. ```
  60. git fetch upstream
  61. git rebase upstream/master
  62. git push origin my-feature-branch -f
  63. ```
  64. ## Update CHANGELOG Again
  65. Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows.
  66. ```
  67. * [#123](https://github.com/dblock/slack-mathbot/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).
  68. ```
  69. Amend your previous commit and force push the changes.
  70. ```
  71. git commit --amend
  72. git push origin my-feature-branch -f
  73. ```
  74. ## Check on Your Pull Request
  75. Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
  76. ## Be Patient
  77. It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
  78. ## Thank You
  79. Please do know that we really appreciate and value your time and work. We love you, really.