|
1 | 1 | const request = require('request') |
2 | 2 |
|
3 | | -exports.handleSubmit = (req, res) => { |
| 3 | +module.exports = (req, res) => { |
4 | 4 | const pullRequest = req.body.pull_request |
5 | 5 | if (shouldHandlePullRequestChange(req)) { |
6 | 6 | const result = handlePullRequest(pullRequest) |
@@ -63,21 +63,13 @@ const getPostRequestOptions = (user, url) => ({ |
63 | 63 |
|
64 | 64 | const getMergeMessage = username => `Hello @${username}, congratulations! You've successfully submitted a pull request. 🎉 |
65 | 65 | **Next steps** |
66 | | - - Continue contributing: If you're looking for projects to contribute to, checkout our [webapp](https://firstcontributions.github.io). |
67 | | - - Join our slack group: We have a community to help/support contributors. [Join slack group](https://join.slack.com/t/firstcontributors/shared_invite/enQtNjkxNzQwNzA2MTMwLTVhMWJjNjg2ODRlNWZhNjIzYjgwNDIyZWYwZjhjYTQ4OTBjMWM0MmFhZDUxNzBiYzczMGNiYzcxNjkzZDZlMDM). |
68 | | - - Share on social media: You can share this content to help more people. [Share](https://firstcontributions.github.io/#social-share). |
| 66 | + - Continue contributing: If you're looking for projects to contribute to, checkout our [<img src="https://avatars0.githubusercontent.com/u/65761570?s=88&u=640f39b808c75c6b86460aa907dd030bcca2f3c7&v=4" width="22" title="web app" /> webapp](https://firstcontributions.github.io). |
| 67 | + - Join our slack group: We have a community to help/support contributors. [<img src="https://edent.github.io/SuperTinyIcons/images/svg/slack.svg" width="22" title="Slack" /> Join slack group](https://join.slack.com/t/firstcontributors/shared_invite/enQtNjkxNzQwNzA2MTMwLTVhMWJjNjg2ODRlNWZhNjIzYjgwNDIyZWYwZjhjYTQ4OTBjMWM0MmFhZDUxNzBiYzczMGNiYzcxNjkzZDZlMDM). |
| 68 | + - Share on social media: You can share this content to help more people. [ <img alt="twitter" title="twitter" src="https://edent.github.io/SuperTinyIcons/images/svg/twitter.svg" width="22"> tweet](https://twitter.com/intent/tweet?text=Yay%21%20I%20just%20made%20my%20first%20open%20source%20contribution%20with%20@1stcontribution.%20You%20can%20too%20at%20https%3A//goo.gl/66Axwe%0A&hashtags=OpenSource,CodeNewbie). [<img alt="twitter" title="twitter" src="https://edent.github.io/SuperTinyIcons/images/svg/facebook.svg" width="22"> share](https://www.facebook.com/sharer/sharer.php?u=https://roshanjossey.github.io/first-contributions"e=Yay%21%20I%20just%20made%20my%20first%20open%20source%20contribution%20with%20First%20Contributions.%20You%20can%20too,%20by%20following%20a%20simple%20tutorial%20at%20https%3A//goo.gl/66Axwe&hashtag=%23OpenSource) |
69 | 69 |
|
70 | 70 | We'd love to hear your thoughts about this project. Let us know how we can improve my commenting or opening an issue here.`; |
71 | 71 |
|
72 | 72 | const logStatusAndErrors = (error, response) => { |
73 | 73 | console.error('error:', error) // Print the error if one occurred |
74 | 74 | console.error('statusCode:', response && response.statusCode) // Print the response status code if a response was received |
75 | 75 | } |
76 | | - |
77 | | -module.exports = { |
78 | | - shouldHandlePullRequestChange, |
79 | | - isChangeInContributorsFile, |
80 | | - isSingleLineChange, |
81 | | - getPostRequestOptions, |
82 | | - getMergeMessage |
83 | | -} |
0 commit comments