Skip to content

Commit 04a5580

Browse files
committed
⬆️ 1.0.0 🎉
1 parent 4b83eb5 commit 04a5580

File tree

6 files changed

+155
-13
lines changed

6 files changed

+155
-13
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
*~
44
*.log
55
node_modules
6+
*.env
7+
.DS_Store
8+
package-lock.json

CONTRIBUTING.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# :eight_spoked_asterisk: :stars: :sparkles: :dizzy: :star2: :star2: :sparkles: :dizzy: :star2: :star2: Contributing :star: :star2: :dizzy: :sparkles: :star: :star2: :dizzy: :sparkles: :stars: :eight_spoked_asterisk:
2+
3+
So, you want to contribute to this project! That's awesome. However, before
4+
doing so, please read the following simple steps how to contribute. This will
5+
make the life easier and will avoid wasting time on things which are not
6+
requested. :sparkles:
7+
8+
## Discuss the changes before doing them
9+
- First of all, open an issue in the repository, using the [bug tracker][1],
10+
describing the contribution you would like to make, the bug you found or any
11+
other ideas you have. This will help us to get you started on the right
12+
foot.
13+
14+
- If it makes sense, add the platform and software information (e.g. operating
15+
system, Node.JS version etc.), screenshots (so we can see what you are
16+
seeing).
17+
18+
- It is recommended to wait for feedback before continuing to next steps.
19+
However, if the issue is clear (e.g. a typo) and the fix is simple, you can
20+
continue and fix it.
21+
22+
## Fixing issues
23+
- Fork the project in your account and create a branch with your fix:
24+
`some-great-feature` or `some-issue-fix`.
25+
26+
- Commit your changes in that branch, writing the code following the
27+
[code style][2]. If the project contains tests (generally, the `test`
28+
directory), you are encouraged to add a test as well. :memo:
29+
30+
- If the project contains a `package.json` or a `bower.json` file add yourself
31+
in the `contributors` array (or `authors` in the case of `bower.json`;
32+
if the array does not exist, create it):
33+
34+
```json
35+
{
36+
"contributors": [
37+
"Your Name <[email protected]> (http://your.website)"
38+
]
39+
}
40+
```
41+
42+
## Creating a pull request
43+
44+
- Open a pull request, and reference the initial issue in the pull request
45+
message (e.g. *fixes #<your-issue-number>*). Write a good description and
46+
title, so everybody will know what is fixed/improved.
47+
48+
- If it makes sense, add screenshots, gifs etc., so it is easier to see what
49+
is going on.
50+
51+
## Wait for feedback
52+
Before accepting your contributions, we will review them. You may get feedback
53+
about what should be fixed in your modified code. If so, just keep committing
54+
in your branch and the pull request will be updated automatically.
55+
56+
## Everyone is happy!
57+
Finally, your contributions will be merged, and everyone will be happy! :smile:
58+
Contributions are more than welcome!
59+
60+
Thanks! :sweat_smile:
61+
62+
63+
64+
[1]: https://github.com/IonicaBizau/github-comments/issues
65+
66+
[2]: https://github.com/IonicaBizau/code-style

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017-19 Ionică Bizău <[email protected]> (https://ionicabizau.net)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->
2+
3+
4+
# github-comments
5+
6+
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/github-comments.svg)](https://www.npmjs.com/package/github-comments) [![Downloads](https://img.shields.io/npm/dt/github-comments.svg)](https://www.npmjs.com/package/github-comments)
7+
8+
> Fetch all the GitHub comments from a repo.
9+
10+
## :yum: How to contribute
11+
Have an idea? Found a bug? See [how to contribute][contributing].
12+
13+
14+
## :sparkling_heart: Support my projects
15+
16+
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously,
17+
this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).
18+
19+
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
20+
21+
22+
- Starring and sharing the projects you like :rocket:
23+
- [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:
24+
- [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
25+
- [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
26+
- **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`
27+
28+
![](https://i.imgur.com/z6OQI95.png)
29+
30+
31+
Thanks! :heart:
32+
33+
34+
35+
## :scroll: License
36+
37+
[MIT][license] © [Ionică Bizău][website]
38+
39+
40+
[badge_patreon]: https://ionicabizau.github.io/badges/patreon.svg
41+
[badge_amazon]: https://ionicabizau.github.io/badges/amazon.svg
42+
[badge_paypal]: https://ionicabizau.github.io/badges/paypal.svg
43+
[badge_paypal_donate]: https://ionicabizau.github.io/badges/paypal_donate.svg
44+
45+
[patreon]: https://www.patreon.com/ionicabizau
46+
[amazon]: http://amzn.eu/hRo9sIZ
47+
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW
48+
49+
[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(https%3A%2F%2Fionicabizau.net)&year=2017#license-mit
50+
[website]: https://ionicabizau.net
51+
[contributing]: /CONTRIBUTING.md
52+
[docs]: /DOCUMENTATION.md

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "github-comments",
3-
"description": "Fetch all the GitHub comments from a repo.",
3+
"description": "Fetch all the GitHub comments from a repo using LienJS.",
44
"keywords": [
55
"github",
66
"comments",
@@ -18,7 +18,7 @@
1818
"start": "node server"
1919
},
2020
"author": "Ionică Bizău <[email protected]> (https://ionicabizau.net)",
21-
"homepage": "https://github.com/IonicaBizau/github-comments#readme",
21+
"homepage": "https://github.com/LienJS/github-comments#readme",
2222
"files": [
2323
"bin/",
2424
"app/",
@@ -32,13 +32,13 @@
3232
],
3333
"repository": {
3434
"type": "git",
35-
"url": "git+ssh://[email protected]/IonicaBizau/github-comments.git"
35+
"url": "git+ssh://[email protected]/LienJS/github-comments.git"
3636
},
3737
"bugs": {
38-
"url": "https://github.com/IonicaBizau/github-comments/issues"
38+
"url": "https://github.com/LienJS/github-comments/issues"
3939
},
4040
"dependencies": {
4141
"gh.js": "^3.0.8",
42-
"lien": "^2.2.6"
42+
"lien": "^3.3.0"
4343
}
44-
}
44+
}

server.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
const Lien = require("lien")
1+
const ctx = require("ctx")
22
, GitHub = require("gh.js")
33
;
44

55
const GITHUB_TOKEN = process.env.GITHUB_TOKEN;
66

7-
const server = new Lien()
8-
, ghClient = new GitHub(GITHUB_TOKEN)
7+
const server = new ctx()
8+
, ghCctxt = new GitHub(GITHUB_TOKEN)
99
;
1010

11-
server.addPage("/:owner/:name", lien => {
12-
ghClient.get(`repos/${lien.params.owner}/${lien.params.name}/issues/comments`, {
11+
server.addPage("/:owner/:name", ctx => {
12+
ghCctxt.get(`repos/${ctx.params.owner}/${ctx.params.name}/issues/comments`, {
1313
all: true
1414
}, (err, allComments) => {
15-
if (err) { return lien.apiError(err); }
16-
lien.end(allComments);
15+
if (err) { return ctx.apiError(err); }
16+
ctx.end(allComments);
1717
});
1818
});
1919

0 commit comments

Comments
 (0)