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
github.com: | |
- user: your github token handle | |
oauth_token: your github token | |
protocol: https |
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
#!/bin/zsh | |
source ~/.bash_profile | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
git push origin $branch | |
# Getting the task data from Jira API | |
response=$(curl -s "${jira_url}/rest/api/2/issue/$branch" -u "$jira_access_token" | sed 's#\\n##g;s#\\#\\\\#g') | |
base_branch=$1 |
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
alias pr='the path of the script/pull_request.sh' | |
export jira_url=jira project base url | |
export jira_access_token=email:Jiratoken | |
export github_author=your github username | |
export github_reviewers=reviewers github handles,seperated,by,comma |
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
dependencies { | |
implementation("androidx.navigation:navigation-compose:2.4.0-rc01") | |
} |
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
// In your view model | |
private val _eventChannel = Channel<Event>(Channel.BUFFERED) | |
val events = _eventChannel.receiveAsFlow() |
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
// Runs only on initial composition | |
LaunchedEffect(key1 = Unit) { | |
viewModel.eventsFlow.collectLatest { value -> | |
when(value) { | |
// Handle events | |
} | |
} | |
} |
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
@Composable | |
fun LoginScreen //.... | |
//.... | |
Button( | |
onClick = { | |
action.invoke(Login) | |
}, modifier = Modifier | |
.fillMaxWidth() | |
.padding(top = 32.dp) |
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
data class LoginState( | |
val isLoading: Boolean = false, | |
val isSuccess: Boolean = false, | |
val error: String? = null | |
) |
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
val Colors.onSurfaceMedium: Color | |
@Composable | |
get() = if (isLight) SurfaceMediumLight else SurfaceMediumDark |
NewerOlder