-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Danger
- Loading branch information
Showing
3 changed files
with
17 additions
and
0 deletions.
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
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,14 @@ | ||
# Message the user | ||
message "Hi @#{github.pr_author} thank you for your submission at Fossasia's GCI 2016 website. Please correct any issues below, if any." | ||
# Chech if a PR is mergeable and war if you have merge issues | ||
can_merge = github.pr_json["mergeable"] | ||
warn("This PR appears to have merge errors. Please check Contribuiting.md for help solving that.", sticky: false) unless can_merge | ||
# Check for PR description | ||
fail 'Please provide a summary in the Pull Request description, containing, at less, your live link.' if github.pr_body.length < 5 | ||
# Warn if there is [WIP] in the title | ||
warn "PR is classed as Work in Progress" if github.pr_title.include? "[WIP]" | ||
# Check if user is a member of the FOSSASIA github org | ||
unless github.api.organization_member?('FOSSASIA', github.pr_author) | ||
message "@#{github.pr_author} you don't appear to be in the FOSSASIA organization, you must fill in [this form](http://fossasia.org/apply-pupils) to be added." | ||
end | ||
fail 'Please add your live link to the PR body.' if !github.pr_body.include? 'http' |
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,3 +1,4 @@ | ||
source 'https://rubygems.org' | ||
gem 'github-pages' | ||
gem 'html-proofer' | ||
gem 'danger' |