use of com.github.pockethub.android.Intents.Builder in project PocketHub by pockethub.
the class BranchFileViewActivity method createIntent.
/**
* Create intent to show file in commit
*
* @param repository
* @param branch
* @param file
* @param blobSha
* @return intent
*/
public static Intent createIntent(Repository repository, String branch, String file, String blobSha) {
Builder builder = new Builder("branch.file.VIEW");
builder.repo(repository);
builder.add(EXTRA_BASE, blobSha);
builder.add(EXTRA_PATH, file);
builder.add(EXTRA_HEAD, branch);
return builder.toIntent();
}
use of com.github.pockethub.android.Intents.Builder in project PocketHub by pockethub.
the class CommitFileViewActivity method createIntent.
/**
* Create intent to show file in commit
*
* @param repository
* @param commit
* @param file
* @return intent
*/
public static Intent createIntent(Repository repository, String commit, GitHubFile file) {
Builder builder = new Builder("commit.file.VIEW");
builder.repo(repository);
builder.add(EXTRA_HEAD, commit);
builder.add(EXTRA_PATH, file.filename());
builder.add(EXTRA_BASE, file.sha());
return builder.toIntent();
}
use of com.github.pockethub.android.Intents.Builder in project PocketHub by pockethub.
the class CreateCommentActivity method createIntent.
/**
* Create intent to create a comment on a diff position
*
* @param repository
* @param commit
* @param path
* @param position
* @return intent
*/
public static Intent createIntent(Repository repository, String commit, String path, int position) {
Builder builder = new Builder("commit.comment.create.VIEW");
builder.repo(repository);
builder.add(EXTRA_BASE, commit);
if (isLineComment(path, position)) {
builder.add(EXTRA_PATH, path).add(EXTRA_POSITION, position);
}
return builder.toIntent();
}
use of com.github.pockethub.android.Intents.Builder in project PocketHub by pockethub.
the class CreateCommentActivity method createIntent.
/**
* Create intent to create a comment
*
* @param gist
* @return intent
*/
public static Intent createIntent(Gist gist) {
Builder builder = new Builder("gist.comment.create.VIEW");
builder.gist(gist);
return builder.toIntent();
}
use of com.github.pockethub.android.Intents.Builder in project PocketHub by pockethub.
the class CreateCommentActivity method createIntent.
/**
* Create intent to create a comment
*
* @param repoId
* @param issueNumber
* @param user
* @return intent
*/
public static Intent createIntent(Repository repoId, int issueNumber, User user) {
Builder builder = new Builder("issue.comment.create.VIEW");
builder.repo(repoId);
builder.add(EXTRA_ISSUE_NUMBER, issueNumber);
builder.add(EXTRA_USER, user);
return builder.toIntent();
}
Aggregations