This repository has been archived by the owner on Mar 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
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
181 changed files
with
7,954 additions
and
1,938 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CHANGELOG.md merge=union |
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ node_js: | |
- "6.7" | ||
|
||
script: | ||
- scripts/deploy_commit.sh | ||
- yarn ci | ||
- yarn danger | ||
|
||
|
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,5 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
extern NSString *const ARUseStagingDefault; | ||
extern NSString *const ARUsePREmissionDefault; | ||
extern NSString *const ARPREmissionIDDefault; |
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
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,8 @@ | ||
#import "ARRootViewController.h" | ||
|
||
@class ARSectionData; | ||
@interface ARRootViewController(PR) | ||
|
||
- (ARSectionData *)prSectionData; | ||
|
||
@end |
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,57 @@ | ||
#import "ARRootViewController+AppHub.h" | ||
#import "NSDateFormatter+TimeAgo.h" | ||
#import "ARDefaults.h" | ||
#import "EmissionPRChooseViewController.h" | ||
|
||
#import <ARGenericTableViewController/ARGenericTableViewController.h> | ||
|
||
@implementation ARRootViewController(PR) | ||
|
||
- (ARSectionData *)prSectionData; | ||
{ | ||
ARSectionData *section = [[ARSectionData alloc] initWithCellDataArray:@[ | ||
[self togglePRBuilds] | ||
]]; | ||
|
||
[self setupSection:section withTitle:@"Code Review"]; | ||
return section; | ||
} | ||
|
||
- (ARCellData *)togglePRBuilds | ||
{ | ||
ARCellData *cellData = [[ARCellData alloc] initWithIdentifier:AROptionCell]; | ||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | ||
|
||
cellData.cellConfigurationBlock = ^(UITableViewCell *cell) { | ||
BOOL usingPR = [defaults boolForKey:ARUsePREmissionDefault]; | ||
|
||
if (usingPR) { | ||
cell.textLabel.text = @"Disable PR Build"; | ||
|
||
} else { | ||
cell.textLabel.text = @"Use a PR build of Emission"; | ||
} | ||
}; | ||
|
||
cellData.cellSelectionBlock = ^(UITableView *tableView, NSIndexPath *indexPath) { | ||
BOOL usingPR = [defaults boolForKey:ARUsePREmissionDefault]; | ||
|
||
if (!usingPR) { | ||
// Show a PR chooser | ||
[self presentViewController:[EmissionPRChooseViewController new] animated:YES completion:NULL]; | ||
} else { | ||
// Undo the changes and restart | ||
[self showAlertViewWithTitle:@"Restarting to undo PR mode" message:@"This will revert back to dev, or apphub based JS" actionTitle:@"Do it" actionHandler:^{ | ||
[defaults setBool:NO forKey:ARUsePREmissionDefault]; | ||
[defaults synchronize]; | ||
|
||
exit(0); | ||
}]; | ||
} | ||
}; | ||
|
||
return cellData; | ||
} | ||
|
||
|
||
@end |
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
Oops, something went wrong.