Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Commit451/LabCoat
  • Iktwo/GitLabAndroid
  • jonduran3000/GitLabAndroid
  • steffandroid/GitLabAndroid
  • xiaoyanit/GitLabAndroid
  • scottolcott/GitLabAndroid
  • james.mu/GitLabAndroid
  • pushkarpandey27/GitLabAndroid
  • atomfrede/GitLabAndroid
  • burrito82/GitLabAndroid
  • txlong_onz/GitLabAndroid
  • ricardo.longa/GitLabAndroid
  • rubenroy/GitLabAndroid
  • remy_android/GitLabAndroid
  • mzestars/GitLabAndroid
  • theobisproject/LabCoat
  • tarek360/GitLabAndroid
  • TR4Android/LabCoat
  • lvsmart/LabCoat
  • buddybuild/LabCoat
  • tkuah/LabCoat
  • jay3126/LabCoat
  • rmad17/LabCoat
  • galvatron/LabCoat
  • lijianjian13/LabCoat
  • Cody2333/LabCoat
  • ajtfreitas/LabCoat
  • nestor.lobo/LabCoat
  • Microgamer/LabCoat
  • irvinwang/LabCoat
  • avallete/LabCoat
  • digicazter/LabCoat
  • lovexiaov/LabCoat
  • dineshkarpe/LabCoat
  • bak1an/LabCoat
  • loomis/LabCoat
  • sank20/LabCoat
  • Jawnnyfoo/LabCoat
  • scottyab/LabCoat
  • aleksandar-stefanovic/LabCoat
  • tfontana/LabCoat
  • fuzzmz/LabCoat
  • dipaksavaliya/LabCoat
  • adi.bk/LabCoat
  • andreea.voicu/LabCoat
  • H1ghT0p/LabCoat
  • indritqoku/LabCoat
  • armpogart/LabCoat
  • eyedol/LabCoat
  • khairulnizan/LabCoat
  • vadm.perspectiva/LabCoat
  • yiyoss1986/LabCoat
  • BRoy98/LabCoat
  • satyarth.23/LabCoat
  • victorpe76/LabCoat
  • canhnht/LabCoat
  • jinhu/LabCoat
  • weathery/LabCoat
  • gitlabproject_s/LabCoat
  • tfKamran/LabCoat
  • voxadam/LabCoat
  • nprail/LabCoat
  • terrakok/LabCoat
  • jungletian/LabCoat
  • goldins/LabCoat
  • insanum/LabCoat
  • lzrs/LabCoat
  • shankarg/LabCoat
  • rm3l/LabCoat
  • alamo_dev/LabCoat
  • insomniaqc/LabCoat
  • mrasif/LabCoat
  • Babasile/LabCoat
  • eeyoo/LabCoat
  • ditkin/LabCoat
  • unbubot/LabCoat
  • bschuhm/LabCoat
  • fanticker/LabCoat
  • colorwebdesigner/LabCoat
  • milouse/LabCoat
80 results
Show changes
Showing
with 199 additions and 144 deletions
Loading
Loading
@@ -70,12 +70,18 @@ class LoginActivity : BaseActivity() {
}
}
 
@BindView(R.id.root) lateinit var root: View
@BindView(R.id.toolbar) lateinit var toolbar: Toolbar
@BindView(R.id.text_input_layout_server) lateinit var textInputLayoutUrl: TextInputLayout
@BindView(R.id.token_hint) lateinit var textInputLayoutToken: TextInputLayout
@BindView(R.id.token_input) lateinit var textToken: TextView
@BindView(R.id.progress) lateinit var progress: View
@BindView(R.id.root)
lateinit var root: View
@BindView(R.id.toolbar)
lateinit var toolbar: Toolbar
@BindView(R.id.text_input_layout_server)
lateinit var textInputLayoutUrl: TextInputLayout
@BindView(R.id.token_hint)
lateinit var textInputLayoutToken: TextInputLayout
@BindView(R.id.token_input)
lateinit var textToken: TextView
@BindView(R.id.progress)
lateinit var progress: View
 
lateinit var teleprinter: Teleprinter
 
Loading
Loading
@@ -279,7 +285,7 @@ class LoginActivity : BaseActivity() {
.show()
 
dialog.findViewById<TextView>(android.R.id.message).movementMethod = LinkMovementMethod.getInstance()
} else {
} else {
snackbarWithDetails(t)
}
}
Loading
Loading
Loading
Loading
@@ -42,11 +42,16 @@ class MergeRequestActivity : BaseActivity() {
}
}
 
@BindView(R.id.root) lateinit var root: ViewGroup
@BindView(R.id.toolbar) lateinit var toolbar: Toolbar
@BindView(R.id.tabs) lateinit var tabLayout: TabLayout
@BindView(R.id.pager) lateinit var viewPager: ViewPager
@BindView(R.id.progress) lateinit var progress: View
@BindView(R.id.root)
lateinit var root: ViewGroup
@BindView(R.id.toolbar)
lateinit var toolbar: Toolbar
@BindView(R.id.tabs)
lateinit var tabLayout: TabLayout
@BindView(R.id.pager)
lateinit var viewPager: ViewPager
@BindView(R.id.progress)
lateinit var progress: View
 
lateinit var project: Project
lateinit var mergeRequest: MergeRequest
Loading
Loading
Loading
Loading
@@ -50,12 +50,18 @@ class MilestoneActivity : BaseActivity() {
}
}
 
@BindView(R.id.root) lateinit var root: View
@BindView(R.id.toolbar) lateinit var toolbar: Toolbar
@BindView(R.id.swipe_layout) lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list) lateinit var listIssues: RecyclerView
@BindView(R.id.message_text) lateinit var textMessage: TextView
@BindView(R.id.progress) lateinit var progress: View
@BindView(R.id.root)
lateinit var root: View
@BindView(R.id.toolbar)
lateinit var toolbar: Toolbar
@BindView(R.id.swipe_layout)
lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list)
lateinit var listIssues: RecyclerView
@BindView(R.id.message_text)
lateinit var textMessage: TextView
@BindView(R.id.progress)
lateinit var progress: View
 
lateinit var adapterMilestoneIssues: MilestoneIssueAdapter
lateinit var layoutManagerIssues: LinearLayoutManager
Loading
Loading
Loading
Loading
@@ -36,8 +36,10 @@ class PickBranchOrTagActivity : AppCompatActivity() {
}
}
 
@BindView(R.id.tabs) lateinit var tabLayout: TabLayout
@BindView(R.id.pager) lateinit var viewPager: ViewPager
@BindView(R.id.tabs)
lateinit var tabLayout: TabLayout
@BindView(R.id.pager)
lateinit var viewPager: ViewPager
 
@OnClick(R.id.root)
fun onRootClicked() {
Loading
Loading
Loading
Loading
@@ -43,11 +43,16 @@ class PipelineActivity : BaseActivity() {
}
}
 
@BindView(R.id.root) lateinit var root: ViewGroup
@BindView(R.id.toolbar) lateinit var toolbar: Toolbar
@BindView(R.id.tabs) lateinit var tabLayout: TabLayout
@BindView(R.id.pager) lateinit var viewPager: ViewPager
@BindView(R.id.progress) lateinit var progress: View
@BindView(R.id.root)
lateinit var root: ViewGroup
@BindView(R.id.toolbar)
lateinit var toolbar: Toolbar
@BindView(R.id.tabs)
lateinit var tabLayout: TabLayout
@BindView(R.id.pager)
lateinit var viewPager: ViewPager
@BindView(R.id.progress)
lateinit var progress: View
 
lateinit var project: Project
lateinit var pipeline: Pipeline
Loading
Loading
Loading
Loading
@@ -70,11 +70,16 @@ class ProjectActivity : BaseActivity() {
}
}
 
@BindView(R.id.root) lateinit var root: ViewGroup
@BindView(R.id.toolbar) lateinit var toolbar: Toolbar
@BindView(R.id.tabs) lateinit var tabLayout: TabLayout
@BindView(R.id.progress) lateinit var progress: View
@BindView(R.id.pager) lateinit var viewPager: ViewPager
@BindView(R.id.root)
lateinit var root: ViewGroup
@BindView(R.id.toolbar)
lateinit var toolbar: Toolbar
@BindView(R.id.tabs)
lateinit var tabLayout: TabLayout
@BindView(R.id.progress)
lateinit var progress: View
@BindView(R.id.pager)
lateinit var viewPager: ViewPager
 
var project: Project? = null
var ref: Ref? = null
Loading
Loading
Loading
Loading
@@ -31,10 +31,14 @@ class ProjectsActivity : BaseActivity() {
}
}
 
@BindView(R.id.toolbar) lateinit var toolbar: Toolbar
@BindView(R.id.tabs) lateinit var tabLayout: TabLayout
@BindView(R.id.pager) lateinit var viewPager: ViewPager
@BindView(R.id.drawer_layout) lateinit var drawerLayout: DrawerLayout
@BindView(R.id.toolbar)
lateinit var toolbar: Toolbar
@BindView(R.id.tabs)
lateinit var tabLayout: TabLayout
@BindView(R.id.pager)
lateinit var viewPager: ViewPager
@BindView(R.id.drawer_layout)
lateinit var drawerLayout: DrawerLayout
 
val onMenuItemClickListener = Toolbar.OnMenuItemClickListener { item ->
when (item.itemId) {
Loading
Loading
Loading
Loading
@@ -29,12 +29,18 @@ class SearchActivity : BaseActivity() {
}
}
 
@BindView(R.id.root) lateinit var root: View
@BindView(R.id.tabs) lateinit var tabLayout: TabLayout
@BindView(R.id.pager) lateinit var viewPager: ViewPager
@BindView(R.id.toolbar) lateinit var toolbar: Toolbar
@BindView(R.id.search) lateinit var textSearch: EditText
@BindView(R.id.clear) lateinit var buttonClear: View
@BindView(R.id.root)
lateinit var root: View
@BindView(R.id.tabs)
lateinit var tabLayout: TabLayout
@BindView(R.id.pager)
lateinit var viewPager: ViewPager
@BindView(R.id.toolbar)
lateinit var toolbar: Toolbar
@BindView(R.id.search)
lateinit var textSearch: EditText
@BindView(R.id.clear)
lateinit var buttonClear: View
 
lateinit var adapterSearch: SearchPagerAdapter
lateinit var mTeleprinter: Teleprinter
Loading
Loading
Loading
Loading
@@ -27,9 +27,12 @@ class SettingsActivity : BaseActivity() {
}
}
 
@BindView(R.id.toolbar) lateinit var toolbar: Toolbar
@BindView(R.id.root_require_device_auth) lateinit var rootRequireDeviceAuth: ViewGroup
@BindView(R.id.switch_require_auth) lateinit var switchRequireAuth: SwitchCompat
@BindView(R.id.toolbar)
lateinit var toolbar: Toolbar
@BindView(R.id.root_require_device_auth)
lateinit var rootRequireDeviceAuth: ViewGroup
@BindView(R.id.switch_require_auth)
lateinit var switchRequireAuth: SwitchCompat
 
@OnClick(R.id.root_require_device_auth)
fun onRequireDeviceAuthClicked() {
Loading
Loading
Loading
Loading
@@ -30,10 +30,14 @@ class TodosActivity : BaseActivity() {
}
}
 
@BindView(R.id.toolbar) lateinit var toolbar: Toolbar
@BindView(R.id.tabs) lateinit var tabLayout: TabLayout
@BindView(R.id.pager) lateinit var viewPager: ViewPager
@BindView(R.id.drawer_layout) lateinit var drawerLayout: DrawerLayout
@BindView(R.id.toolbar)
lateinit var toolbar: Toolbar
@BindView(R.id.tabs)
lateinit var tabLayout: TabLayout
@BindView(R.id.pager)
lateinit var viewPager: ViewPager
@BindView(R.id.drawer_layout)
lateinit var drawerLayout: DrawerLayout
 
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Loading
Loading
Loading
Loading
@@ -42,9 +42,12 @@ class UserActivity : BaseActivity() {
}
}
 
@BindView(R.id.toolbar) lateinit var toolbar: Toolbar
@BindView(R.id.collapsing_toolbar) lateinit var collapsingToolbarLayout: CollapsingToolbarLayout
@BindView(R.id.backdrop) lateinit var backdrop: ImageView
@BindView(R.id.toolbar)
lateinit var toolbar: Toolbar
@BindView(R.id.collapsing_toolbar)
lateinit var collapsingToolbarLayout: CollapsingToolbarLayout
@BindView(R.id.backdrop)
lateinit var backdrop: ImageView
 
lateinit var user: User
 
Loading
Loading
Loading
Loading
@@ -17,6 +17,7 @@ class MilestoneAdapter(private val listener: MilestoneAdapter.Listener) : Recycl
val TYPE_ITEM = 0
val TYPE_FOOTER = 1
}
val values: MutableList<Milestone> = ArrayList()
private var loading: Boolean = false
 
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@ class PipelinePagerAdapter(context: Context, fm: FragmentManager, private val pr
 
when (position) {
0 -> return PipelineDescriptionFragment.newInstance(project, pipeline)
//1 -> return PipelineDescriptionFragment.newInstance(project, pipeline)
//1 -> return PipelineDescriptionFragment.newInstance(project, pipeline)
}
 
throw IllegalStateException("Position exceeded on view pager")
Loading
Loading
Loading
Loading
@@ -89,7 +89,7 @@ class ProjectPagerAdapter(context: ProjectActivity, fm: FragmentManager) : Fragm
throw IllegalStateException("Position exceeded on view pager")
}
 
private fun isDisabled(enabledState: Boolean?) : Boolean{
private fun isDisabled(enabledState: Boolean?): Boolean {
if (enabledState != null && !enabledState) {
return true
}
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ import okhttp3.OkHttpClient
* Provides access to all the GitLab things. Wraps RSS and the Retrofit service, in
* case we need to do overrides or global
*/
class GitLab private constructor(builder: Builder, gitLabService: GitLabService, gitLabRss: GitLabRss): GitLabService by gitLabService,
class GitLab private constructor(builder: Builder, gitLabService: GitLabService, gitLabRss: GitLabRss) : GitLabService by gitLabService,
GitLabRss by gitLabRss {
 
val client: OkHttpClient
Loading
Loading
Loading
Loading
@@ -17,7 +17,7 @@ interface GitLabService {
 
companion object {
const val API_VERSION = "api/v4"
const val MAX_TREE_PER_PAGE = "100"
const val MAX_PER_PAGE = "100"
}
 
/* --- USERS --- */
Loading
Loading
@@ -25,131 +25,131 @@ interface GitLabService {
/**
* Get currently authenticated user
*/
@GET(API_VERSION + "/user")
@GET("$API_VERSION/user")
fun getThisUser(): Single<Response<User>>
 
@GET(API_VERSION + "/users")
@GET("$API_VERSION/users")
fun getUsers(): Single<List<User>>
 
@GET
fun getUsers(@Url url: String): Single<List<User>>
 
@GET(API_VERSION + "/users")
@GET("$API_VERSION/users")
fun searchUsers(@Query("search") query: String): Single<Response<List<User>>>
 
@GET
fun searchUsers(@Url url: String, @Query("search") query: String): Single<Response<List<User>>>
 
@GET(API_VERSION + "/users/{id}")
@GET("$API_VERSION/users/{id}")
fun getUser(@Path("id") userId: Long): Single<User>
 
/* --- GROUPS --- */
@GET(API_VERSION + "/groups")
@GET("$API_VERSION/groups")
fun getGroups(): Single<Response<List<Group>>>
 
@GET
fun getGroups(@Url url: String): Single<Response<List<Group>>>
 
@GET(API_VERSION + "/groups/{id}")
@GET("$API_VERSION/groups/{id}")
fun getGroup(@Path("id") id: Long): Single<Group>
 
@GET(API_VERSION + "/groups/{id}/projects?order_by=last_activity_at")
@GET("$API_VERSION/groups/{id}/projects?order_by=last_activity_at")
fun getGroupProjects(@Path("id") id: Long): Single<Response<List<Project>>>
 
@GET(API_VERSION + "/groups/{id}/members")
@GET("$API_VERSION/groups/{id}/members")
fun getGroupMembers(@Path("id") groupId: Long): Single<Response<List<User>>>
 
@FormUrlEncoded
@POST(API_VERSION + "/groups/{id}/members")
@POST("$API_VERSION/groups/{id}/members")
fun addGroupMember(@Path("id") groupId: Long,
@Field("user_id") userId: Long,
@Field("access_level") accessLevel: Int): Single<Response<User>>
 
@FormUrlEncoded
@PUT(API_VERSION + "/groups/{id}/members/{user_id}")
@PUT("$API_VERSION/groups/{id}/members/{user_id}")
fun editGroupMember(@Path("id") groupId: Long,
@Path("user_id") userId: Long,
@Field("access_level") accessLevel: Int): Single<User>
 
@DELETE(API_VERSION + "/groups/{id}/members/{user_id}")
@DELETE("$API_VERSION/groups/{id}/members/{user_id}")
fun removeGroupMember(@Path("id") groupId: Long,
@Path("user_id") userId: Long): Completable
 
/* --- PROJECTS --- */
 
@GET(API_VERSION + "/projects?membership=true&order_by=last_activity_at&archived=false")
@GET("$API_VERSION/projects?membership=true&order_by=last_activity_at&archived=false")
fun getAllProjects(): Single<Response<List<Project>>>
 
@GET(API_VERSION + "/projects?owned=true&order_by=last_activity_at&archived=false")
@GET("$API_VERSION/projects?owned=true&order_by=last_activity_at&archived=false")
fun getMyProjects(): Single<Response<List<Project>>>
 
@GET(API_VERSION + "/projects?starred=true")
@GET("$API_VERSION/projects?starred=true")
fun getStarredProjects(): Single<Response<List<Project>>>
 
@GET(API_VERSION + "/projects/{id}")
@GET("$API_VERSION/projects/{id}")
fun getProject(@Path("id") projectId: String): Single<Project>
 
// see https://docs.gitlab.com/ce/api/projects.html#get-single-project
@GET(API_VERSION + "/projects/{namespace}%2F{project_name}")
@GET("$API_VERSION/projects/{namespace}%2F{project_name}")
fun getProject(@Path("namespace") namespace: String,
@Path("project_name") projectName: String): Single<Project>
 
@GET
fun getProjects(@Url url: String): Single<Response<List<Project>>>
 
@GET(API_VERSION + "/projects")
@GET("$API_VERSION/projects")
fun searchAllProjects(@Query("search") query: String): Single<Response<List<Project>>>
 
@GET(API_VERSION + "/projects/{id}/members")
@GET("$API_VERSION/projects/{id}/members")
fun getProjectMembers(@Path("id") projectId: Long): Single<Response<List<User>>>
 
@GET
fun getProjectMembers(@Url url: String): Single<Response<List<User>>>
 
@FormUrlEncoded
@POST(API_VERSION + "/projects/{id}/members")
@POST("$API_VERSION/projects/{id}/members")
fun addProjectMember(@Path("id") projectId: Long,
@Field("user_id") userId: Long,
@Field("access_level") accessLevel: Int): Single<Response<User>>
 
@FormUrlEncoded
@PUT(API_VERSION + "/projects/{id}/members/{user_id}")
@PUT("$API_VERSION/projects/{id}/members/{user_id}")
fun editProjectMember(@Path("id") projectId: Long,
@Path("user_id") userId: Long,
@Field("access_level") accessLevel: Int): Single<User>
 
@DELETE(API_VERSION + "/projects/{id}/members/{user_id}")
@DELETE("$API_VERSION/projects/{id}/members/{user_id}")
fun removeProjectMember(@Path("id") projectId: Long,
@Path("user_id") userId: Long): Completable
 
@POST(API_VERSION + "/projects/{id}/fork")
@POST("$API_VERSION/projects/{id}/fork")
fun forkProject(@Path("id") projectId: Long): Completable
 
@POST(API_VERSION + "/projects/{id}/star")
@POST("$API_VERSION/projects/{id}/star")
fun starProject(@Path("id") projectId: Long): Single<Response<Project>>
 
@POST(API_VERSION + "/projects/{id}/unstar")
@POST("$API_VERSION/projects/{id}/unstar")
fun unstarProject(@Path("id") projectId: Long): Single<Project>
 
@Multipart
@POST(API_VERSION + "/projects/{id}/uploads")
@POST("$API_VERSION/projects/{id}/uploads")
fun uploadFile(@Path("id") projectId: Long,
@Part file: MultipartBody.Part): Single<FileUploadResponse>
 
/* --- MILESTONES --- */
 
@GET(API_VERSION + "/projects/{id}/milestones")
@GET("$API_VERSION/projects/{id}/milestones")
fun getMilestones(@Path("id") projectId: Long,
@Query("state") state: String?): Single<Response<List<Milestone>>>
 
@GET
fun getMilestones(@Url url: String): Single<Response<List<Milestone>>>
 
@GET(API_VERSION + "/projects/{id}/issues")
@GET("$API_VERSION/projects/{id}/issues")
fun getMilestonesByIid(@Path("id") projectId: Long,
@Query("iids") internalMilestoneId: String): Single<List<Milestone>>
 
@GET(API_VERSION + "/projects/{id}/milestones/{milestone_id}/issues")
@GET("$API_VERSION/projects/{id}/milestones/{milestone_id}/issues")
fun getMilestoneIssues(@Path("id") projectId: Long,
@Path("milestone_id") milestoneId: Long): Single<Response<List<Issue>>>
 
Loading
Loading
@@ -157,28 +157,28 @@ interface GitLabService {
fun getMilestoneIssues(@Url url: String): Single<Response<List<Issue>>>
 
@FormUrlEncoded
@POST(API_VERSION + "/projects/{id}/milestones")
@POST("$API_VERSION/projects/{id}/milestones")
fun createMilestone(@Path("id") projectId: Long,
@Field("title") title: String,
@Field("description") description: String,
@Field("due_date") dueDate: String?): Single<Milestone>
 
@FormUrlEncoded
@PUT(API_VERSION + "/projects/{id}/milestones/{milestone_id}")
@PUT("$API_VERSION/projects/{id}/milestones/{milestone_id}")
fun editMilestone(@Path("id") projectId: Long,
@Path("milestone_id") milestoneId: Long,
@Field("title") title: String,
@Field("description") description: String,
@Field("due_date") dueDate: String?): Single<Milestone>
 
@PUT(API_VERSION + "/projects/{id}/milestones/{milestone_id}")
@PUT("$API_VERSION/projects/{id}/milestones/{milestone_id}")
fun updateMilestoneStatus(@Path("id") projectId: Long,
@Path("milestone_id") milestoneId: Long,
@Query("state_event") @Milestone.StateEvent status: String): Single<Milestone>
 
/* --- MERGE REQUESTS --- */
 
@GET(API_VERSION + "/projects/{id}/merge_requests")
@GET("$API_VERSION/projects/{id}/merge_requests")
fun getMergeRequests(@Path("id") projectId: Long,
@Query("state") state: String): Single<Response<List<MergeRequest>>>
 
Loading
Loading
@@ -186,23 +186,23 @@ interface GitLabService {
fun getMergeRequests(@Url url: String,
@Query("state") state: String): Single<Response<List<MergeRequest>>>
 
@GET(API_VERSION + "/projects/{id}/merge_requests")
@GET("$API_VERSION/projects/{id}/merge_requests")
fun getMergeRequestsByIid(@Path("id") projectId: Long,
@Query("iids") internalMergeRequestId: String): Single<List<MergeRequest>>
 
@GET(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}")
@GET("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}")
fun getMergeRequest(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: Long): Single<MergeRequest>
 
@GET(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/commits")
@GET("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/commits")
fun getMergeRequestCommits(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: Long): Single<List<RepositoryCommit>>
 
@GET(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/changes")
@GET("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/changes")
fun getMergeRequestChanges(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: Long): Single<MergeRequest>
 
@GET(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/notes")
@GET("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/notes")
fun getMergeRequestNotes(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: Long): Single<Response<List<Note>>>
 
Loading
Loading
@@ -210,30 +210,30 @@ interface GitLabService {
fun getMergeRequestNotes(@Url url: String): Single<Response<List<Note>>>
 
@FormUrlEncoded
@POST(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/notes")
@POST("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/notes")
fun addMergeRequestNote(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: Long,
@Field("body") body: String): Single<Note>
 
@PUT(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/merge")
@PUT("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/merge")
fun acceptMergeRequest(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: Long): Single<Response<MergeRequest>>
 
/* --- ISSUES --- */
 
@GET(API_VERSION + "/projects/{id}/issues")
@GET("$API_VERSION/projects/{id}/issues")
fun getIssues(@Path("id") projectId: Long,
@Query("state") state: String): Single<Response<List<Issue>>>
 
@GET
fun getIssues(@Url url: String): Single<Response<List<Issue>>>
 
@GET(API_VERSION + "/projects/{id}/issues/{issue_id}")
@GET("$API_VERSION/projects/{id}/issues/{issue_id}")
fun getIssue(@Path("id") projectId: Long,
@Path("issue_id") issueId: String): Single<Issue>
 
@FormUrlEncoded
@POST(API_VERSION + "/projects/{id}/issues")
@POST("$API_VERSION/projects/{id}/issues")
fun createIssue(@Path("id") projectId: Long,
@Field("title") title: String,
@Field("description") description: String,
Loading
Loading
@@ -242,7 +242,7 @@ interface GitLabService {
@Field("labels") commaSeparatedLabelNames: String?,
@Field("confidential") isConfidential: Boolean): Single<Issue>
 
@PUT(API_VERSION + "/projects/{id}/issues/{issue_iid}")
@PUT("$API_VERSION/projects/{id}/issues/{issue_iid}")
fun updateIssue(@Path("id") projectId: Long,
@Path("issue_iid") issueIid: Long,
@Query("title") title: String,
Loading
Loading
@@ -252,12 +252,12 @@ interface GitLabService {
@Query("labels") commaSeparatedLabelNames: String?,
@Query("confidential") isConfidential: Boolean): Single<Issue>
 
@PUT(API_VERSION + "/projects/{id}/issues/{issue_iid}")
@PUT("$API_VERSION/projects/{id}/issues/{issue_iid}")
fun updateIssueStatus(@Path("id") projectId: Long,
@Path("issue_iid") issueIid: Long,
@Query("state_event") @Issue.EditState status: String): Single<Issue>
 
@GET(API_VERSION + "/projects/{id}/issues/{issue_iid}/notes")
@GET("$API_VERSION/projects/{id}/issues/{issue_iid}/notes")
fun getIssueNotes(@Path("id") projectId: Long,
@Path("issue_iid") issueIid: Long): Single<Response<List<Note>>>
 
Loading
Loading
@@ -265,46 +265,46 @@ interface GitLabService {
fun getIssueNotes(@Url url: String): Single<Response<List<Note>>>
 
@FormUrlEncoded
@POST(API_VERSION + "/projects/{id}/issues/{issue_iid}/notes")
@POST("$API_VERSION/projects/{id}/issues/{issue_iid}/notes")
fun addIssueNote(@Path("id") projectId: Long,
@Path("issue_iid") issueIid: Long,
@Field("body") body: String): Single<Note>
 
@DELETE(API_VERSION + "/projects/{id}/issues/{issue_iid}")
@DELETE("$API_VERSION/projects/{id}/issues/{issue_iid}")
fun deleteIssue(@Path("id") projectId: Long,
@Path("issue_iid") issueIid: Long): Completable
 
/* --- REPOSITORY --- */
 
@GET(API_VERSION + "/projects/{id}/repository/branches?order_by=last_activity_at")
@GET("$API_VERSION/projects/{id}/repository/branches?order_by=last_activity_at")
fun getBranches(@Path("id") projectId: Long): Single<Response<List<Branch>>>
 
@GET
fun getBranches(@Url url: String): Single<Response<List<Branch>>>
 
@GET(API_VERSION + "/projects/{id}/repository/contributors")
@GET("$API_VERSION/projects/{id}/repository/contributors")
fun getContributors(@Path("id") projectId: String): Single<List<Contributor>>
 
@GET(API_VERSION + "/projects/{id}/repository/tree?per_page=" + MAX_TREE_PER_PAGE)
@GET("$API_VERSION/projects/{id}/repository/tree?per_page=$MAX_PER_PAGE")
fun getTree(@Path("id") projectId: Long,
@Query("ref") ref: String?,
@Query("path") path: String?): Single<List<RepositoryTreeObject>>
 
@GET(API_VERSION + "/projects/{id}/repository/files/{file_path}")
@GET("$API_VERSION/projects/{id}/repository/files/{file_path}")
fun getFile(@Path("id") projectId: Long,
@Path("file_path") path: String,
@Query("ref") ref: String): Single<RepositoryFile>
 
@GET(API_VERSION + "/projects/{id}/repository/commits")
@GET("$API_VERSION/projects/{id}/repository/commits")
fun getCommits(@Path("id") projectId: Long,
@Query("ref_name") branchName: String,
@Query("page") page: Int): Single<List<RepositoryCommit>>
 
@GET(API_VERSION + "/projects/{id}/repository/commits/{sha}")
@GET("$API_VERSION/projects/{id}/repository/commits/{sha}")
fun getCommit(@Path("id") projectId: Long,
@Path("sha") commitSHA: String): Single<RepositoryCommit>
 
@GET(API_VERSION + "/projects/{id}/repository/commits/{sha}/diff")
@GET("$API_VERSION/projects/{id}/repository/commits/{sha}/diff")
fun getCommitDiff(@Path("id") projectId: Long,
@Path("sha") commitSHA: String): Single<List<Diff>>
 
Loading
Loading
@@ -315,7 +315,7 @@ interface GitLabService {
* *
* @return all the labels within a project
*/
@GET(API_VERSION + "/projects/{id}/labels")
@GET("$API_VERSION/projects/{id}/labels?per_page=$MAX_PER_PAGE")
fun getLabels(@Path("id") projectId: Long): Single<List<Label>>
 
/**
Loading
Loading
@@ -329,7 +329,7 @@ interface GitLabService {
* *
* @return Single
*/
@POST(API_VERSION + "/projects/{id}/labels")
@POST("$API_VERSION/projects/{id}/labels")
fun createLabel(@Path("id") projectId: Long,
@Query("name") name: String,
@Query("color") color: String?,
Loading
Loading
@@ -342,13 +342,13 @@ interface GitLabService {
* *
* @return all the labels within a project
*/
@DELETE(API_VERSION + "/projects/{id}/labels")
@DELETE("$API_VERSION/projects/{id}/labels")
fun deleteLabel(@Path("id") projectId: Long,
@Query("name") name: String): Single<Label>
 
 
/* --- BUILDS --- */
@GET(API_VERSION + "/projects/{id}/jobs")
@GET("$API_VERSION/projects/{id}/jobs")
fun getBuilds(@Path("id") projectId: Long,
@Query("scope") scope: String?): Single<Response<List<Build>>>
 
Loading
Loading
@@ -356,24 +356,24 @@ interface GitLabService {
fun getBuilds(@Url url: String,
@Query("scope") state: String?): Single<Response<List<Build>>>
 
@GET(API_VERSION + "/projects/{id}/jobs/{build_id}")
@GET("$API_VERSION/projects/{id}/jobs/{build_id}")
fun getBuild(@Path("id") projectId: Long,
@Path("build_id") buildId: Long): Single<Build>
 
@POST(API_VERSION + "/projects/{id}/jobs/{build_id}/retry")
@POST("$API_VERSION/projects/{id}/jobs/{build_id}/retry")
fun retryBuild(@Path("id") projectId: Long,
@Path("build_id") buildId: Long): Single<Build>
 
@POST(API_VERSION + "/projects/{id}/jobs/{build_id}/erase")
@POST("$API_VERSION/projects/{id}/jobs/{build_id}/erase")
fun eraseBuild(@Path("id") projectId: Long,
@Path("build_id") buildId: Long): Single<Build>
 
@POST(API_VERSION + "/projects/{id}/jobs/{build_id}/cancel")
@POST("$API_VERSION/projects/{id}/jobs/{build_id}/cancel")
fun cancelBuild(@Path("id") projectId: Long,
@Path("build_id") buildId: Long): Single<Build>
 
/* --- Pipelines --- */
@GET(API_VERSION + "/projects/{id}/pipelines")
@GET("$API_VERSION/projects/{id}/pipelines")
fun getPipelines(@Path("id") projectId: Long,
@Query("scope") scope: String?): Single<Response<List<Pipeline>>>
 
Loading
Loading
@@ -381,7 +381,7 @@ interface GitLabService {
fun getPipelines(@Url url: String,
@Query("scope") state: String?): Single<Response<List<Pipeline>>>
 
@GET(API_VERSION + "/projects/{id}/pipelines/{pipeline_id}/jobs")
@GET("$API_VERSION/projects/{id}/pipelines/{pipeline_id}/jobs")
fun getPipelineJobs(@Path("id") projectId: Long, @Path("pipeline_id") pipelineId: Long,
@Query("scope") scope: String?): Single<Response<List<Pipeline>>>
 
Loading
Loading
@@ -389,90 +389,90 @@ interface GitLabService {
fun getPipelineJobs(@Url url: String,
@Query("scope") state: String?): Single<Response<List<Pipeline>>>
 
@GET(API_VERSION + "/projects/{id}/pipelines/{pipeline_id}")
@GET("$API_VERSION/projects/{id}/pipelines/{pipeline_id}")
fun getPipeline(@Path("id") projectId: Long,
@Path("pipeline_id") pipelineId: Long): Single<Pipeline>
 
@POST(API_VERSION + "/projects/{id}/pipelines/{pipeline_id}/retry")
@POST("$API_VERSION/projects/{id}/pipelines/{pipeline_id}/retry")
fun retryPipeline(@Path("id") projectId: Long,
@Path("pipeline_id") pipelineId: Long): Single<Pipeline>
 
@POST(API_VERSION + "/projects/{id}/pipelines/{pipeline_id}/cancel")
@POST("$API_VERSION/projects/{id}/pipelines/{pipeline_id}/cancel")
fun cancelPipeline(@Path("id") projectId: Long,
@Path("pipeline_id") pipelineId: Long): Single<Pipeline>
 
/* --- SNIPPETS --- */
@GET(API_VERSION + "/projects/{id}/snippets")
@GET("$API_VERSION/projects/{id}/snippets")
fun getSnippets(@Path("id") projectId: Long): Single<Response<List<Snippet>>>
 
@GET
fun getSnippets(@Url url: String): Single<Response<List<Snippet>>>
 
/* --- TODOS --- */
@GET(API_VERSION + "/todos")
@GET("$API_VERSION/todos")
fun getTodos(@Query("state") @Todo.State state: String): Single<Response<List<Todo>>>
 
@GET
fun getTodosByUrl(@Url url: String): Single<Response<List<Todo>>>
 
/* --- TAGS --- */
@GET(API_VERSION + "/projects/{id}/repository/tags")
@GET("$API_VERSION/projects/{id}/repository/tags")
fun getTags(@Path("id") projectId: Long): Single<List<Tag>>
 
/* --- AWARD EMOJI --- */
@GET(API_VERSION + "/projects/{id}/issues/{issue_id}/award_emoji")
@GET("$API_VERSION/projects/{id}/issues/{issue_id}/award_emoji")
fun getAwardEmojiForIssue(@Path("id") projectId: Long,
@Path("issue_id") issueId: String): Single<List<AwardEmoji>>
 
@GET(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/award_emoji")
@GET("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/award_emoji")
fun getAwardEmojiForMergeRequest(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: String): Single<List<AwardEmoji>>
 
@GET(API_VERSION + "/projects/{id}/issues/{issue_id}/notes/{note_id}/award_emoji")
@GET("$API_VERSION/projects/{id}/issues/{issue_id}/notes/{note_id}/award_emoji")
fun getAwardEmojiForIssueNote(@Path("id") projectId: Long,
@Path("issue_id") issueId: String,
@Path("note_id") noteId: String): Single<List<AwardEmoji>>
 
@GET(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/notes/{note_id}/award_emoji")
@GET("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/notes/{note_id}/award_emoji")
fun getAwardEmojiForMergeRequestNote(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: String,
@Path("note_id") noteId: String): Single<List<AwardEmoji>>
 
@POST(API_VERSION + "/projects/{id}/issues/{issue_id}/award_emoji")
@POST("$API_VERSION/projects/{id}/issues/{issue_id}/award_emoji")
fun postAwardEmojiForIssue(@Path("id") projectId: Long,
@Path("issue_id") issueId: String): Single<AwardEmoji>
 
@GET(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/award_emoji")
@GET("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/award_emoji")
fun postAwardEmojiForMergeRequest(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: String): Single<AwardEmoji>
 
@GET(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/notes/{note_id}/award_emoji")
@GET("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/notes/{note_id}/award_emoji")
fun postAwardEmojiForMergeRequestNote(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: String,
@Path("note_id") noteId: String): Single<AwardEmoji>
 
@POST(API_VERSION + "/projects/{id}/issues/{issue_id}/notes/{note_id}/award_emoji")
@POST("$API_VERSION/projects/{id}/issues/{issue_id}/notes/{note_id}/award_emoji")
fun postAwardEmojiForIssueNote(@Path("id") projectId: Long,
@Path("issue_id") issueId: String,
@Path("note_id") noteId: String): Single<AwardEmoji>
 
@DELETE(API_VERSION + "/projects/{id}/issues/{issue_id}/award_emoji/{award_id}")
@DELETE("$API_VERSION/projects/{id}/issues/{issue_id}/award_emoji/{award_id}")
fun deleteAwardEmojiForIssue(@Path("id") projectId: Long,
@Path("issue_id") issueId: String,
@Path("award_id") awardId: String): Single<AwardEmoji>
 
@DELETE(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/award_emoji/{award_id}")
@DELETE("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/award_emoji/{award_id}")
fun deleteAwardEmojiForMergeRequest(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: String,
@Path("award_id") awardId: String): Single<AwardEmoji>
 
@DELETE(API_VERSION + "/projects/{id}/issues/{issue_id}/notes/{note_id}/award_emoji/{award_id}")
@DELETE("$API_VERSION/projects/{id}/issues/{issue_id}/notes/{note_id}/award_emoji/{award_id}")
fun deleteAwardEmojiForIssueNote(@Path("id") projectId: Long,
@Path("issue_id") issueId: String,
@Path("note_id") noteId: String,
@Path("award_id") awardId: String): Single<AwardEmoji>
 
@DELETE(API_VERSION + "/projects/{id}/merge_requests/{merge_request_id}/notes/{note_id}/award_emoji/{award_id}")
@DELETE("$API_VERSION/projects/{id}/merge_requests/{merge_request_id}/notes/{note_id}/award_emoji/{award_id}")
fun deleteAwardEmojiForMergeRequestNote(@Path("id") projectId: Long,
@Path("merge_request_id") mergeRequestId: String,
@Path("note_id") noteId: String,
Loading
Loading
Loading
Loading
@@ -3,4 +3,4 @@ package com.commit451.gitlab.api
/**
* Represents there was a null body from Retrofit
*/
class NullBodyException: Exception()
class NullBodyException : Exception()
Loading
Loading
@@ -12,7 +12,7 @@ object X509TrustManagerProvider {
 
val x509TrustManager: X509TrustManager by lazy {
val trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm())
val nullKeystore : KeyStore? = null
val nullKeystore: KeyStore? = null
trustManagerFactory.init(nullKeystore)
val trustManagers = trustManagerFactory.trustManagers
if (trustManagers.size != 1 || trustManagers[0] !is X509TrustManager) {
Loading
Loading
Loading
Loading
@@ -34,7 +34,7 @@ object Prefs {
@IntDef(STARTING_VIEW_PROJECTS.toLong(), STARTING_VIEW_GROUPS.toLong(), STARTING_VIEW_ACTIVITY.toLong(), STARTING_VIEW_TODOS.toLong())
annotation class StartingView
 
lateinit private var prefs: SharedPreferences
private lateinit var prefs: SharedPreferences
 
fun init(context: Context) {
if (context !is Application) {
Loading
Loading
Loading
Loading
@@ -11,11 +11,16 @@ import com.commit451.gitlab.R
 
class HttpLoginDialog(context: Context, realm: String, loginListener: HttpLoginDialog.LoginListener) : AppCompatDialog(context) {
 
@BindView(R.id.message_text) lateinit var textMessage: TextView
@BindView(R.id.login_username) lateinit var textUsername: EditText
@BindView(R.id.login_password) lateinit var textPassword: EditText
@BindView(R.id.ok_button) lateinit var buttonOk: Button
@BindView(R.id.cancel_button) lateinit var buttonCancel: Button
@BindView(R.id.message_text)
lateinit var textMessage: TextView
@BindView(R.id.login_username)
lateinit var textUsername: EditText
@BindView(R.id.login_password)
lateinit var textPassword: EditText
@BindView(R.id.ok_button)
lateinit var buttonOk: Button
@BindView(R.id.cancel_button)
lateinit var buttonCancel: Button
 
init {
setContentView(R.layout.dialog_http_login)
Loading
Loading