File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import { useCreate } from "../components/Hooks"
2121
2222export default function CourseCreator ( {
2323 slug = "" ,
24+ repositoryBranch = "" ,
2425 repository = "" ,
2526 repositoryUser = "" ,
2627 repositoryPassword = "" ,
@@ -34,6 +35,7 @@ export default function CourseCreator({
3435 const { mutate, isLoading } = useCreate ( slug )
3536 const [ course , setCourse ] = useState ( {
3637 slug : slug ,
38+ repositoryBranch : repositoryBranch ,
3739 repository : repository ,
3840 repositoryUser : repositoryUser ,
3941 repositoryPassword : repositoryPassword ,
@@ -75,6 +77,20 @@ export default function CourseCreator({
7577 type = "text"
7678 />
7779 </ FormControl >
80+ < Text color = "gray.600" lineHeight = { 1.5 } >
81+ Which Git branch should the course be loaded from? Leave empty to
82+ use the repository's default branch.
83+ </ Text >
84+ < FormControl >
85+ < FormLabel > Git branch:</ FormLabel >
86+ < Input
87+ value = { course . repositoryBranch }
88+ onChange = { ( e ) =>
89+ setCourse ( { ...course , repositoryBranch : e . target . value } )
90+ }
91+ type = "text"
92+ />
93+ </ FormControl >
7894 < Text color = "gray.600" lineHeight = { 1.5 } >
7995 You may manually set a course slug. This makes sense if you want
8096 to import the same course more than once. If you leave this field
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ declare interface CourseMetaProps {
3434 description ?: string
3535 slug ?: string
3636 repository ?: string
37+ repositoryBranch ?: string
3738 repositoryUser ?: string
3839 repositoryPassword ?: string
3940 webhookSecret ?: string
You can’t perform that action at this time.
0 commit comments