diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 197487fb..00c1f1e7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -114,7 +114,7 @@ jobs:
- name: Build V
shell: cmd
run: |
- make.bat -gcc
+ makev.bat -gcc
# Must run after "Build V": the script shells out to `v.exe`, which
# does not exist until V is built.
- name: Install SQLite
diff --git a/fork.v b/fork.v
index b63a43ef..5851f902 100644
--- a/fork.v
+++ b/fork.v
@@ -241,19 +241,18 @@ fn (mut app App) create_fork(source Repo, owner_name string, owner_user_id int,
return err
}
mut row := Repo{
- git_dir: target_path
- name: name
- user_id: owner_user_id
- user_name: owner_name
- description: description
- is_public: is_public && source.is_public
- primary_branch: source.primary_branch
- created_at: int(time.now().unix())
- status: .done
+ git_dir: target_path
+ name: name
+ user_id: owner_user_id
+ user_name: owner_name
+ description: description
+ is_public: is_public && source.is_public
+ primary_branch: source.primary_branch
+ created_at: int(time.now().unix())
+ status: .done
disable_discussions: source.disable_discussions
- disable_projects: source.disable_projects
- disable_milestones: source.disable_milestones
- disable_wiki: source.disable_wiki
+ disable_projects: source.disable_projects
+ disable_milestones: source.disable_milestones
}
app.add_repo(row) or {
os.rmdir_all(target_path) or {}
@@ -265,15 +264,15 @@ fn (mut app App) create_fork(source Repo, owner_name string, owner_user_id int,
}
source_relation := app.find_fork_by_repo(source.id) or { RepoFork{} }
relation := RepoFork{
- repo_id: created.id
+ repo_id: created.id
source_repo_id: source.id
- root_repo_id: if source_relation.root_repo_id > 0 {
+ root_repo_id: if source_relation.root_repo_id > 0 {
source_relation.root_repo_id
} else {
source.id
}
- created_by: created_by
- created_at: int(time.now().unix())
+ created_by: created_by
+ created_at: int(time.now().unix())
}
sql app.db {
insert relation into RepoFork
diff --git a/gitly.v b/gitly.v
index 66ae334f..57a111fc 100644
--- a/gitly.v
+++ b/gitly.v
@@ -93,8 +93,8 @@ fn new_app() !&App {
mut app := &App{
// db: sqlite.connect('gitly.sqlite') or { panic(err) }
- db: connect_db(conf)!
- config: conf
+ db: connect_db(conf)!
+ config: conf
started_at: time.now().unix()
}
@@ -733,7 +733,6 @@ fn (mut app App) migrate_tables() ! {
app.add_missing_column('Repo', 'disable_discussions', db_bool_column_type())!
app.add_missing_column('Repo', 'disable_projects', db_bool_column_type())!
app.add_missing_column('Repo', 'disable_milestones', db_bool_column_type())!
- app.add_missing_column('Repo', 'disable_wiki', db_bool_column_type())!
app.add_missing_column('Repo', 'is_pinned', db_bool_column_type())!
app.add_missing_column('Repo', 'created_at', 'INTEGER NOT NULL DEFAULT 0')!
app.add_missing_column('Repo', 'required_approvals', 'INTEGER NOT NULL DEFAULT 0')!
@@ -914,7 +913,7 @@ fn (mut app App) add_missing_column(table_name string, column_name string, colum
fn (mut ctx Context) json_success[T](result T) veb.Result {
response := api.ApiSuccessResponse[T]{
success: true
- result: result
+ result: result
}
return ctx.json(response)
diff --git a/highlight/markdown_test.v b/highlight/markdown_test.v
index c5823681..8406cb46 100644
--- a/highlight/markdown_test.v
+++ b/highlight/markdown_test.v
@@ -1,9 +1,9 @@
module highlight
-const markdown = ' test'
+const xss_markdown_sample = ' test'
fn test_convert_markdown_to_html() {
- rendered := convert_markdown_to_html(markdown)
+ rendered := convert_markdown_to_html(xss_markdown_sample)
assert !rendered.contains('