-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
143 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
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. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
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. | ||
|
||
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. | ||
|
||
## Scope | ||
|
||
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. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at [ash@ashfurrow.com](mailto:ash@ashfurrow.com). All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and 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. | ||
|
||
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. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,73 @@ | ||
# Aeryn | ||
Server to invite new contributors to a GitHub organization team | ||
|
||
Aeryn is a server app, written in Sinatra, used to invite new contributors to a GitHub organization team once they have a pull request merged. | ||
|
||
## Motivation | ||
|
||
Moya's [contributor guidelines](https://github.com/Moya/contributors) explain in detail what we'll summarize here: we believe in giving push access to contributors after they have a pull request merged. On Moya's [main repo](https://github.com/Moya/Moya), we've been practicing this since June 2015; the practice has led to an engaged, respectful community helping to improve the project. | ||
|
||
But remembering to check every pull request, actually inviting new contributors, leaving them a comment – it's work that adds up. This project automates that process using GitHub WebHooks and the GitHub API. | ||
|
||
## Setup | ||
|
||
There are a few prerequisites: | ||
|
||
- A GitHub personal access token. | ||
- The team ID of the GitHub org team to invite contributors to. | ||
|
||
### Personal Access Token | ||
|
||
You'll need to [create a new personal access token](https://github.com/settings/tokens/new) on whatever account will be inviting new contributors (this means the account needs admin writes). The access token needs the `admin:org` scope. | ||
|
||
### Team ID | ||
|
||
The organization's Team ID is also required. This is a number that's not easily retrieved from GitHub's user interface. You can retrieve it by using `curl` and your personal access token from the previous step. | ||
|
||
```sh | ||
> curl -H "Authorization: token PUT_YOUR_ACCESS_TOKEN_HERE" https://api.github.com/orgs/PUT_YOUR_ORG_NAME_HERE/teams | ||
``` | ||
|
||
That will return a JSON list of teams on the org. Pick the one you want to invite contributors to: | ||
|
||
```json | ||
{ | ||
"name": "Contributors", | ||
"id": 1234567, | ||
... | ||
``` | ||
|
||
### Deploy | ||
|
||
The easiest way to deploy the app is to use Heroku. Click the following to get set up and provide necessary config values. | ||
|
||
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) | ||
|
||
If you don't want to use Heroku, you can copy `.env.sample` to `.env` to set environment variables for your server. The variables themselves are described in the [app.json](app.json) file. | ||
|
||
### Configuring the WebHook | ||
|
||
Once deployed, we need to point your GitHub repo(s) at the server. Go to your repository's settings page and WebHook tab, and create a new WebHook. | ||
|
||
You'll need the server's address, as well as the `WEBHOOK_ENDPOINT` environment variable you set up earlier. So if your server is at `https://example.com` and the endpoint is `/payload`, then the Payload URL for the WebHook is `https://example.com/payload`. | ||
|
||
You'll also need to specify a secret. This is a random string that GitHub will use to sign the requests sent to Aeryn, to make sure no one else can control the server but GitHub. | ||
|
||
![New WebHook interface](web/new_web_hook.png) | ||
|
||
Only certain events need to trigger the WebHook, specifically the "Pull Request" event. | ||
|
||
![New WebHook interface](web/trigger_events.png) | ||
|
||
Once you've saved the WebHook, GitHub will send a ping to your server to see if everything is working. Aeryn should respond that everything is fine, and you'll see a nice green check under the WebHook settings: | ||
|
||
![New WebHook interface](web/green_check.png) | ||
|
||
If you don't see a green checkmark, it means that GitHub wasn't able to reach Aeryn. Double-check your environment variables and server config, and please feel free to [open an issue](https://github.com/Moya/Aeryn/issues/new). | ||
|
||
## Contributing | ||
|
||
This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. | ||
|
||
This project subscribes to the [Moya Contributors Guidelines](https://github.com/Moya/contributors) which TLDR: means we give out push access easily and often. That's actually the whole point of this repo. | ||
|
||
This repo subscribes to the [Contributor Code of Conduct](http://contributor-covenant.org/version/1/4/), based on the [Contributor Covenant](http://contributor-covenant.org) version 1.4.0. The maintainers take the code of conduct seriously. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.