Skip to content

Commit 6628ae2

Browse files
authored
Add github folder (#28)
1 parent 4216637 commit 6628ae2

File tree

5 files changed

+177
-0
lines changed

5 files changed

+177
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @nathunsmitty

.github/CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
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 radio.web@media.ucla.edu. 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/

.github/CONTRIBUTING.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Contributing Guidelines
2+
Oh hai! Looks like you're contributing to UCLA Radio code. Here are some things to know that will help you do that!
3+
4+
Here at UCLA Radio, we strive to rapidly produce products without eschewing good coding practices or readability. Code review is one of the best ways to ensure this. Since we use GitHub to host all of our projects, our code review comes in the form of the [pull request](https://help.github.com/articles/about-pull-requests/).
5+
6+
## Git
7+
GitHub revolves around this amazing piece of software called [git](https://git-scm.com). Git is what's known as a version control system, meaning that it tracks all changes we make to code. If you aren't familiar with git there are a lot of [great](https://try.github.io/levels/1/challenges/1) [resources](https://rogerdudler.github.io/git-guide/) to get you started--check them out, play around with it yourself, and then come back when you're feeling somewhat comfortable.
8+
9+
## Our Workflow
10+
There a a lot of git workflows out there: [GitHub flow](https://guides.github.com/introduction/flow/), [git flow](http://nvie.com/posts/a-successful-git-branching-model/), the [Gitlab flow](https://about.gitlab.com/2014/09/29/gitlab-flow/), etc. Our workflow takes some common elements of these but adapts it for the practicality of our needs. The basic ideas are as follows:
11+
1. `master` is our stable branch, and is what is in production.
12+
2. Any change to `master`--whether that be a new feature, refactor, or bug fix--is done by creating a separate branch off of `master` with the naming scheme `<your first name>/<descriptive-title-for-your-change>`. For example if Nathan were to add a feature making the site font comic sans, he would name it `nathan/comic-sans` or something similar. The goal is for anyone else browsing the branch to immediately know the change the branch is making.
13+
3. When you think a feature is ready for production and after you've tested and linted it, make a pull request.
14+
- **Note:** Create individual pull requests for every feature you make. It helps the people reviewing your code and makes it easier to revert changes back if any bugs are introduced.
15+
4. After you make any changes requested on that pull request and get the infamous [LGTM](http://www.lgtm.in) from a Web Manager, you can [squash merge](https://git-scm.com/docs/git-merge#git-merge---squash) it into `master`. This should be done via GitHub.
16+
5. After your branch is merged, you can delete it, both locally and remotely.
17+
18+
## The Workflow in Practice
19+
Let's be real, there are a lot of git commands. They're complicated and hard to remember. Luckily, [Git Town](http://www.git-town.com) makes our workflow extremely easy with just 4 commands.
20+
21+
1. `git hack` creates a new branch off of `master`.
22+
2. `git commit` is the same as it was before. Git Town doesn't change anything.
23+
3. Instead of pushing commits to the remote copy of your new branch, run `git sync`. This pushes your commits, but also checks the remote for any changes to `master` and updates your branch accordingly.
24+
4. `git new-pull-request` makes it very easy to make that pull request when you're ready.
25+
5. Merging should be done via GitHub.
26+
6. You can also delete the remote copy of your branch via GitHub. To delete your local branch, run the command `git branch -d <your branch name>`.
27+
28+
29+
## Commit Guidelines
30+
31+
Writing good commit messages is important for collaborative development and maintainability. It will also help you out in the future when you revisit your code. Please refer to [The seven rules of a great Git commit message](https://chris.beams.io/posts/git-commit/#seven-rules) on the guidelines we strive to follow. That being said, as [Zach Holman puts it](https://zachholman.com/posts/git-commit-history/), our "unit of change" is the pull request; it is much more import that your pull request be well written than your individual commits.
32+
33+
## Reviewing a Pull Request
34+
35+
There will be a point where you will not only have to create a pull request, but review one. When reviewing a pull request, remember that the main purpose of a pull request is to help your teammates learn and improve. Realize that no one, neither reviewer nor reviewee, is perfect and ask questions rather than assume something is immediately wrong. We're all on the same team (literally), so focus on being polite and constructive to your teammates. If you run into any disagreements, defer to your project manager. If you and your project manager disagree, defer to the online editor.
36+
37+
If you are tagged, you **must** look at the code and respond within two days. The reviewee cannot ship your code without your feedback. You are free to peruse and comment on other pull requests if you so wish.
38+
39+
When reviewing code, you should read through all the code changed, added, and deleted, looking for anything that looks out of place or different from how you would do it. You should also pull the branch and run it locally on your machine to make sure everything works for you.
40+
41+
Not sure what to look out for when reviewing code? Originate has a great list of things to look for in their [code review guide](https://www.originate.com/library/code-review-guide):
42+
> * Is every piece of code in the right place, i.e. model code in a model, controller logic in a controller, app-> specific helper code in a helper, generic helper code in a library?
43+
> * Do all classes have only one responsibility?
44+
> * Do all methods do only one thing?
45+
> * If a method has a side-effect, is that clear from the name, and otherwise documented?
46+
> * Are all classes/methods/variables named properly so that the code is self-describing?
47+
> * Is everything as private as possible, i.e. only the intended public interface is public?
48+
> * Are too many things private? This could be an indication that you should extract a class.
49+
> * Are all files within a reasonable size (e.g., less than 100 lines of code)?
50+
> * Are all methods less than 10 lines of code?
51+
> * No law of demeter violations (providing whole objects to methods when all that’s needed is the value of one attribute of them)?
52+
> * Is everything tested? Is each thing tested enough? Is it not over-tested?
53+
> * Are there tests for private methods? This shouldn't happen, it is a code smell.
54+
> * Every class should have a small comment describing what it represents/does. Public methods should have comments describing what they are for, or when to call them, if this isn’t obvious from the code. Comments shouldn’t describe what the method does (this is visible from looking at the code).
55+
> * Are there any obvious performance-problems, like making a database query for each loop iteration, rather than using a more optimized query that loads all data at once?
56+
> * Spacing errors like no empty line between methods, or too many empty lines
57+
> * There shouldn’t be any commented-out code.
58+
> * There should be no debug statements like `console.log` or the likes.
59+
> * There should be no TODO's, as this is often a crutch for being lazy.

.github/issue_template.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!--- Be sure to add a descriptive title above! -->
2+
3+
## Context
4+
<!--- How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world. -->
5+
6+
## Expected Behavior
7+
<!--- If you're describing a bug, tell us what should happen. If you're suggesting a change/improvement, tell us how it should work. -->
8+
9+
## Current Behavior
10+
<!--- If describing a bug, tell us what happens instead of the expected behavior. If suggesting a change/improvement, explain the difference from current behavior -->
11+
12+
## Possible Solution
13+
<!--- Not obligatory, but suggest a fix/reason for the bug, or ideas how to implement the addition or change -->
14+
15+
## Screenshot(s)
16+
<!--- (if applicable--you can delete otherwise) -->
17+
18+
## Steps to Reproduce
19+
<!--- (for bugs only--you can delete if otherwise) -->
20+
<!--- Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant. -->
21+
1.
22+
2.
23+
3.
24+
4.
25+
26+
## Your Environment
27+
<!--- (for bugs only--you can delete if otherwise) -->
28+
<!--- Include as many relevant details about the environment you experienced the bug in. Put an `x` in the boxes that apply -->
29+
30+
Device:
31+
iOS Version:
32+
<!--- If other, please add -->

.github/pull_request_template.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!--- Be sure to add a descriptive title above! -->
2+
3+
## Types of changes
4+
<!--- What types of changes does your code introduce to UCLA Radio? Put an `x` in the boxes that apply. -->
5+
6+
- [ ] Bugfix (change which fixes an issue)
7+
- [ ] New feature (change which adds functionality)
8+
- [ ] Refactor (change which changes the codebase without affecting its external behavior)
9+
- [ ] Non-breaking change (fix or feature that would causes existing functionality to work as expected)
10+
- [ ] Breaking change (fix or feature that would cause existing functionality to __not__ work as expected)
11+
12+
## Purpose
13+
<!--- Describe the problem or feature. Link to the issue(s) fixed by this pull request if applicable. -->
14+
15+
## Approach
16+
<!--- How does your change address the problem? -->
17+
18+
## Learning
19+
<!--- Describe the research stage. Link to any blog posts, video, patterns, libraries, addons, or other resources that helped you to solve this problem. -->
20+
21+
## Screenshot(s)
22+
<!--- (if applicable--you can delete otherwise) -->
23+
<!--- Include a screenshot here if the change you made changes the look of the site in any way! -->
24+
25+
## Checklist
26+
<!--- Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code. -->
27+
28+
- [ ] My branch follows the branch naming scheme of UCLA Radio, and can merge into `master` without error.
29+
- [ ] My code follows the code style of this project, and I have linted it to confirm this.
30+
- [ ] I have added tests that prove my fix is effective or that my feature works.
31+
- [ ] My change requires a change to the documentation and I have updated the documentation accordingly.
32+
- [ ] All new and existing tests passed.
33+
34+
## Platform
35+
<!--- (if applicable--you can delete otherwise) -->
36+
__Operating System:__ <!--- e.g., iOS 11.1 -->
37+
38+
## Further Comments
39+
<!--- Please add anything that you'd like to say that you didn't already get a chance to. You can delete this if you don't have anything to add. -->

0 commit comments

Comments
 (0)