Skip to content

Commit 16cb2f0

Browse files
Bhavya GuptaBhavya Gupta
Bhavya Gupta
authored and
Bhavya Gupta
committed
first commit
Signed-off-by: Bhavya Gupta <[email protected]>
0 parents  commit 16cb2f0

10 files changed

+185
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
npm-debug.log
3+
*.pem
4+
.env
5+
package-lock.json

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sudo: false
2+
language: node_js
3+
node_js:
4+
- "8.3"
5+
notifications:
6+
disabled: true

CODE_OF_CONDUCT.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at undefined. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Contributing
2+
3+
[fork]: /fork
4+
[pr]: /compare
5+
[style]: https://standardjs.com/
6+
[code-of-conduct]: CODE_OF_CONDUCT.md
7+
8+
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
9+
10+
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
11+
12+
## Submitting a pull request
13+
14+
1. [Fork][fork] and clone the repository
15+
1. Configure and install the dependencies: `npm install`
16+
1. Make sure the tests pass on your machine: `npm test`, note: these tests also apply the linter, so no need to lint seperately
17+
1. Create a new branch: `git checkout -b my-branch-name`
18+
1. Make your change, add tests, and make sure the tests still pass
19+
1. Push to your fork and [submit a pull request][pr]
20+
1. Pat your self on the back and wait for your pull request to be reviewed and merged.
21+
22+
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
23+
24+
- Follow the [style guide][style] which is using standard. Any linting errors should be shown when running `npm test`
25+
- Write and update tests.
26+
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
27+
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
28+
29+
Work in Progress pull request are also welcome to get feedback early on, or if there is something blocked you.
30+
31+
## Resources
32+
33+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
34+
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
35+
- [GitHub Help](https://help.github.com)

LICENSE

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ISC License
2+
3+
Copyright (c) 2018, Bhavya Gupta <undefined>
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted, provided that the above
7+
copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# probot_welcome
2+
3+
> a GitHub App built with [probot](https://github.com/probot/probot) that
4+
5+
## Setup
6+
7+
```sh
8+
# Install dependencies
9+
npm install
10+
11+
# Run the bot
12+
npm start
13+
```
14+
15+
See [docs/deploy.md](docs/deploy.md) if you would like to run your own instance of this app.

__tests__/index.test.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// You can import your modules
2+
// const index = require('../index')
3+
4+
test('that we can run tests', () => {
5+
// your real tests go here
6+
expect(1 + 2 + 3).toBe(6)
7+
})
8+
9+
// For more information about testing with Jest see:
10+
// https://facebook.github.io/jest/

docs/deploy.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Deploying
2+
3+
If you would like to run your own instance of this app, see the [docs for deployment](https://probot.github.io/docs/deployment/).
4+
5+
This app requires these **Permissions & events** for the GitHub App:
6+
7+
> **TODO**: List permissions required for deployment here. See [probot/stale](https://github.com/probot/stale/blob/master/docs/deploy.md) for an example.

index.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
let arr = ['']
2+
3+
module.exports = (robot) => {
4+
robot.log('Yay, the app was loaded!')
5+
6+
robot.on('issues.opened', async context => {
7+
const params = context.issue({body: 'Hello World!'})
8+
console.log(params)
9+
console.log('********')
10+
if (arr.indexOf(context.payload.sender.login) !== -1) {
11+
// cj
12+
} else {
13+
arr.push(context.payload.sender.login)
14+
console.log(arr)
15+
return context.github.issues.createComment(params)
16+
}
17+
})
18+
}

package.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "probot_welcome",
3+
"version": "1.0.0",
4+
"description": "",
5+
"author": "Bhavya Gupta <undefined>",
6+
"license": "ISC",
7+
"repository": "https://github.com/bhavya14/probot_welcome.git",
8+
"scripts": {
9+
"start": "probot run ./index.js",
10+
"test": "jest && standard"
11+
},
12+
"dependencies": {
13+
"probot": "^6.0.0"
14+
},
15+
"devDependencies": {
16+
"jest": "^21.2.1",
17+
"smee-client": "^1.0.1",
18+
"standard": "^10.0.3"
19+
},
20+
"engines": {
21+
"node": ">= 8.3.0"
22+
},
23+
"standard": {
24+
"env": [
25+
"jest"
26+
]
27+
}
28+
}

0 commit comments

Comments
 (0)