-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Kanban board #8346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Kanban board #8346
Changes from 250 commits
Commits
Show all changes
379 commits
Select commit
Hold shift + click to select a range
9336664
fix bug where project gear button never shows in repo sidebar
adelowo d35fb3e
Make sure uncategorized board always have the projectID
adelowo 4367f22
make sure project boards can be edited
adelowo 7edfedc
close modal on success
adelowo 63ea2af
reload on name change
adelowo 41cebe6
format template properly
adelowo a87c8ca
delete projects
adelowo 4ce64a1
Fix MergeConflict relicts and fronted Lint (#6)
6543 d7b1e8c
tiny updates
adelowo 0d4d957
Merge branch 'master' of github.com:go-gitea/gitea into kanban_board
adelowo 93863ba
fix button translation
adelowo 6e24ab1
add new board column to a project
adelowo 7a04527
fix trash icon
adelowo e6f710a
fix merge conflict relicts
6543 31bc3a3
fix js lint issues
6543 bd2868d
remove inrelated code change
6543 b3ddc58
beautify
6543 d99c577
migrate octicons
6543 9b9cd05
Merge branch 'master' into kanban_board
6543 36c2d2d
remove <span class="badge">{{svg "octicon..."}}</span>
6543 3d6d0c7
Merge branch 'master' into kanban_board
6543 5fc69c2
fix Board Menue
6543 c68b70f
Merge branch master into kanban_board
6543 adb8405
rm deadcode (merge conflict relicts)
6543 4ee5212
fix some lint errors
6543 d3a3006
Merge branch 'master' into kanban_board
6543 eeee1d6
...
6543 2d37d70
Merge branch 'master' into kanban_board
6543 b024482
dont split add direct
6543 147dd90
remove merge conflict relicts
6543 c75e62f
code refactor
6543 55bd9e7
fix Issue Sidebar
6543 4fd1c22
FIX
6543 c4be71d
smal ui fix
6543 eedbd98
addopt new style
6543 248e030
addopt unit disable/enable ...
6543 4d6ca62
Update modules/setting/repository.go
6543 c5466c2
hide Project related Comments if Disabled
6543 db4d342
fix octicons
6543 755a178
code format
6543 26c96d2
reformat template
6543 2b4ac5c
fix only on issue on a board, refactor, move logic into models
6543 ea4bddf
remove template debug stuff
6543 b6df0dc
fix things after cleanup
6543 3c862f8
refactor & lints
6543 069983c
lint & refactor & fix
6543 d686a1d
name convention and split
6543 3068438
ChangeProjectStatus & ChangeMilestonStatus are similar but combining …
6543 2f660d0
typo fix & convince revive
6543 5822bc5
Merge branch 'master' into kanban_board
6543 31c2b9d
fix css
6543 2d5ae7b
fix lint
6543 3104c1b
format template
6543 9329913
make it look nicer and make it work
6543 95ebbb6
remove projects from profile page
adelowo c738c04
Draft ONE
6543 c84b888
Fix Find: Error 1066: Not unique table/alias: issue_project
6543 6134e77
handle edge casses
6543 e40d51d
GroupBy act wrong - rm
6543 7f9f277
remove db schema change relicts
6543 5a05ac8
Merge branch 'master' into kanban_board
6543 1319962
fix, imprufe, refactor
6543 3521fc6
impruve board card look
6543 b2fc19b
RENAME: IssueProject -> ProjectIssues
6543 9bac2d1
smal renames and imprufements
6543 8c992c8
canf find error but fix lint
6543 60efc5f
fix & extend migration
6543 d4f118b
Fix migration - creat tables outside a session
6543 8a20acd
fix js thanks @jaqra
6543 3e80ee1
import fromat ...
6543 ac1557a
Merge branch 'master' into kanban_board
6543 18113eb
fix milestone color
6543 2e086fa
Merge branch 'master' into kanban_board
6543 7b8c70e
Merge branch 'master' into kanban_board
6543 f2f2086
Merge branch 'master' into kanban_board
adelowo 4a329be
Merge branch 'master' into kanban_board
adelowo ad0e040
Update web_src/js/features/projects.js
6543 1ed3636
Merge branch 'master' into kanban_board
6543 a228324
Add enable/disable project unit for repository and global unit check
metiftikci e10ba6b
Add enable/disable project unit for repository and global unit check
6543 589662e
Show/Hide Project section on issue view sidebar according to permission
metiftikci 82f5740
Add modal confir for deleting a board
metiftikci 6380431
use Upercase - looks nicer
6543 ad49c9e
Fix models/project_issues.go
6543 604119f
let project-unit enable/disable via API
6543 e69f38b
let Projects disabled on old Repos (migration)
6543 eeb0d4b
fix lint
6543 c44cf5b
Merge branch 'master' into kanban_board
6543 aceae47
Merge branch 'master' into kanban_board
adelowo 311494d
Merge branch 'master' of github.com:go-gitea/gitea into kanban_board
adelowo 1b32f58
add tests for Projects
adelowo 31db0fc
update copyright year
adelowo d745b5b
Merge branch 'master' of github.com:go-gitea/gitea into kanban_board
adelowo edb2602
remove debug printing
adelowo 6c75e70
Merge branch 'master' into kanban_board
6543 8928a0d
dont use x.AllCols.Update
6543 6c4a933
update fixtures, add link checks
6543 f487f9b
correct fixtures & test
6543 5bbf647
fix
6543 b88499d
add files repo4
6543 e1effa1
Merge branch 'master' into kanban_board
6543 bd40920
this was no comment & translate
6543 36acce9
Apply suggestions from code review
6543 1981eb4
Merge branch 'master' into kanban_board
6543 4fb2106
Merge branch 'master' into kanban_board
6543 3a7181c
repoID can be NUL & is Inexed; Only RepoistoryType is valid
6543 0001370
Rename ProjectType Names & count functions take care of ProjectType
6543 5eba1c9
Merge branch 'master' into kanban_board
6543 e0eab4d
fix TEST
6543 15e39d0
change ProjectType names - follow convention
6543 8eed2bb
use only id and check access via repo on router functions
6543 1d06f8e
Merge branch 'master' into kanban_board
6543 d46ce37
fix tests
6543 87ed7fe
fix fixtures
6543 4a78ffc
dont forget the migrations
6543 d34c4ff
Update routers/repo/issue.go
6543 675f52f
Merge branch 'master' into kanban_board
6543 9fc9ffb
Merge branch 'master' into kanban_board
adelowo 3d1570f
kanban: add a minimum height for droppable area of project boards (#9)
kevans91 61d7445
Merge branch 'master' into kanban_board
adelowo b95fb53
Merge branch 'master' into kanban_board
6543 b27c731
adds some css to cards and board-cards (see commit description for mo…
ee404ec
hide template field for project edit
6543 5da0cd9
Merge branch 'master' into kanban_board
6543 8fa6ccb
Merge branch 'master' into kanban_board
6543 52691e3
Kanban board (#11)
4e585b0
Fixes error 500 when trying to create a User or na Organization project
DefinitelyADev 6ab3e4b
Fix for create a User or na Organization project showing
DefinitelyADev 2fe798b
Revents 7eb8846
DefinitelyADev 0ee13f7
Revert "Fix for create a User or na Organization project showing"
DefinitelyADev 686b2f2
Fixes "When creating and issue, after selecting a project the project…
DefinitelyADev e3b4ed3
Merge branch 'master' into kanban_board
6543 aed1a56
Merge branch 'master' into kanban_board
6543 a0dd2f3
Merge branch 'master' into kanban_board
6543 957412a
Added English localization for filter_projects (#13)
7399758
Merge branch 'master' into kanban_board
6543 888dc65
Merge branch 'master' into kanban_board
6543 17b3a7a
Merge branch 'master' into kanban_board
adelowo c346d22
Merge branch 'master' into kanban_board
adelowo d7ff2bd
Merge branch 'master' into kanban_board
6543 b1421c7
Merge branch 'master' into kanban_board
lunny 72c6b51
Merge branch 'master' into kanban_board
adelowo 3620489
Merge branch 'master' into kanban_board
6543 21ace77
Merge branch 'master' into kanban_board
6543 19b348a
Merge branch 'master' into kanban_board
6543 e889da7
Merge branch 'master' into kanban_board
6543 cf8e783
Merge branch 'master' into kanban_board
6543 4442037
Merge branch 'master' into kanban_board
6543 a67aedf
Merge branch 'master' into kanban_board
adelowo 13bf054
Merge branch 'master' into kanban_board
6543 6f49097
delete Projects and related correctly on RepoDeletion -> adapt change…
6543 e4a48f9
fix lint
6543 1ababcf
Merge branch 'master' into kanban_board
6543 55b9431
Merge branch 'master' into kanban_board
6543 140e5bd
fix lint
6543 8b99fdc
Merge branch 'master' into kanban_board
6543 52db2e1
Merge branch 'master' into kanban_board
6543 4eef37c
Apply suggestions from code review
6543 50852ce
Apply suggestions from code review
6543 b1794de
Merge branch 'master' into kanban_board
6543 cbeba0f
Update web_src/js/features/projects.js
6543 f1e6b80
Merge branch 'master' into kanban_board
6543 07b9597
add silverwind tweeks
6543 4c7072e
add Index
6543 fecec01
Update web_src/js/features/projects.js
6543 caa40cb
stylistic tweak
6543 aeab76c
Merge branch 'master' into kanban_board
6543 d483e96
as per @zeripath
6543 c06ba4b
Apply suggestions from code review
6543 2a8a987
suggestions form code review
6543 c74f87a
a nit
6543 3992506
Merge branch 'master' into kanban_board
6543 d7fb97b
BugFix: save ClosedDate on Close
6543 dce5077
Merge branch 'master' into kanban_board
6543 16e44e8
Merge branch 'master' into kanban_board
adelowo 50cb3b0
Merge branch 'master' into kanban_board
6543 08be11c
Merge branch 'master' into kanban_board
6543 474a965
Merge branch 'master' into kanban_board
6543 0f4a7ad
Merge branch 'master' into kanban_board
6543 a3eae2a
new PROJECT section in Settings
6543 b11c766
Merge branch 'master' into kanban_board
6543 9221a39
correct Default field
6543 67692d7
fix DeleteProj Bug
6543 0d11332
Merge branch 'master' into kanban_board
6543 391f760
rename ProjectBorardType enum
6543 7f1d860
apply @silverwind suggestions
6543 dbe5b96
Merge branch 'master' into kanban_board
6543 5810613
Merge branch 'master' into kanban_board
adelowo 6bf75ee
Merge branch 'master' into kanban_board
6543 24731ef
Merge branch 'master' into kanban_board
zeripath 693d8b9
Multiple fixes
zeripath 59650ee
Update web_src/js/features/projects.js
6543 1f25a5a
sort order package.json
6543 f0101b0
Merge branch 'master' into kanban_board
6543 429a5c2
complete @silverwind suggestion
6543 18674e5
rm current unused
6543 2c55136
Merge branch 'master' into kanban_board
6543 1749e58
Merge branch 'master' into kanban_board
6543 9e94db0
Merge branch 'master' into kanban_board
6543 585ba57
fix lint
6543 b27415e
project_issues.go -> project_issue.go
6543 24d6e1e
dedub code
6543 0c7391a
update Count each in single SQL
6543 b4432d5
fix lint
6543 b5e53d0
Apply suggestions from code review
6543 0f55178
Update ToDo in web_src/js/features/projects.js
6543 23eed99
Merge branch 'master' into kanban_board
6543 d6ecb55
Apply suggestions from code review
6543 c90bd69
Merge branch 'master' into kanban_board
6543 9a2a583
Merge branch 'master' into kanban_board
adelowo 7a668ff
Merge branch 'master' into kanban_board
6543 f24c8f5
remove ToDo note and move it as proposal to #12270
6543 3f435a2
Docs: Update Comparison
6543 a692b18
Merge branch 'master' into kanban_board
6543 1d3371e
if backend respond with an error move issue to old bord back
6543 5cc83dc
Merge branch 'master' into kanban_board
6543 2bb433c
Merge branch 'master' into kanban_board
techknowlogick d851614
Merge branch 'master' into kanban_board
6543 6fa272a
as per @lunny
6543 5438aee
Merge branch 'master' into kanban_board
6543 c884473
fix templates/repo/projects/view.tmpl
6543 aa0fa1d
Merge branch 'master' into kanban_board
6543 127d69b
EditBoardTitle: dont reload
6543 1b191e0
Merge branch 'master' into kanban_board
6543 d171fa3
Merge branch 'master' into kanban_board
adelowo 4d6d0b7
Merge branch 'master' into kanban_board
adelowo adba43f
Merge branch 'master' into kanban_board
6543 7f2059e
Merge branch 'master' into kanban_board
6543 3519413
addapt #12383
6543 7c54db3
Merge branch 'master' into kanban_board
6543 26d850d
Merge branch 'master' into kanban_board
6543 f058723
Merge branch 'master' into kanban_board
6543 1fc91cd
Merge branch 'master' into kanban_board
lunny 915ab60
Merge branch 'master' into kanban_board
6543 a923160
Merge branch 'master' into kanban_board
adelowo 20eed58
Merge branch 'master' into kanban_board
zeripath 4a5ea56
Merge branch 'master' into kanban_board
6543 ab633e1
Merge branch 'master' into kanban_board
6543 46d5173
Merge branch 'master' into kanban_board
6543 caa68dc
Merge branch 'master' into kanban_board
zeripath d3ef729
Merge branch 'master' into kanban_board
6543 b840634
Merge branch 'master' into kanban_board
6543 60c99f8
Merge branch 'master' into kanban_board
6543 6fcdc41
Merge branch 'master' into kanban_board
6543 a470c71
Merge branch 'master' into kanban_board
adelowo a70ff2f
Merge branch 'master' into kanban_board
6543 ea14063
Merge branch 'master' into kanban_board
6543 fcec5f3
Merge branch 'master' into kanban_board
adelowo a48f839
Merge branch 'master' into kanban_board
6543 16af23e
Merge branch 'master' into kanban_board
techknowlogick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ref: refs/heads/master |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[core] | ||
repositoryformatversion = 0 | ||
filemode = true | ||
bare = true |
1 change: 1 addition & 0 deletions
1
integrations/gitea-repositories-meta/user5/repo4.git/description
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Unnamed repository; edit this file 'description' to name the repository. |
15 changes: 15 additions & 0 deletions
15
integrations/gitea-repositories-meta/user5/repo4.git/hooks/applypatch-msg.sample
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
# | ||
# An example hook script to check the commit log message taken by | ||
# applypatch from an e-mail message. | ||
# | ||
# The hook should exit with non-zero status after issuing an | ||
# appropriate message if it wants to stop the commit. The hook is | ||
# allowed to edit the commit message file. | ||
# | ||
# To enable this hook, rename this file to "applypatch-msg". | ||
|
||
. git-sh-setup | ||
commitmsg="$(git rev-parse --git-path hooks/commit-msg)" | ||
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} | ||
: |
24 changes: 24 additions & 0 deletions
24
integrations/gitea-repositories-meta/user5/repo4.git/hooks/commit-msg.sample
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
# | ||
# An example hook script to check the commit log message. | ||
# Called by "git commit" with one argument, the name of the file | ||
# that has the commit message. The hook should exit with non-zero | ||
# status after issuing an appropriate message if it wants to stop the | ||
# commit. The hook is allowed to edit the commit message file. | ||
# | ||
# To enable this hook, rename this file to "commit-msg". | ||
|
||
# Uncomment the below to add a Signed-off-by line to the message. | ||
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg | ||
# hook is more suited to it. | ||
# | ||
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') | ||
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" | ||
|
||
# This example catches duplicate Signed-off-by lines. | ||
|
||
test "" = "$(grep '^Signed-off-by: ' "$1" | | ||
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { | ||
echo >&2 Duplicate Signed-off-by lines. | ||
exit 1 | ||
} |
173 changes: 173 additions & 0 deletions
173
integrations/gitea-repositories-meta/user5/repo4.git/hooks/fsmonitor-watchman.sample
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use IPC::Open2; | ||
|
||
# An example hook script to integrate Watchman | ||
# (https://facebook.github.io/watchman/) with git to speed up detecting | ||
# new and modified files. | ||
# | ||
# The hook is passed a version (currently 2) and last update token | ||
# formatted as a string and outputs to stdout a new update token and | ||
# all files that have been modified since the update token. Paths must | ||
# be relative to the root of the working tree and separated by a single NUL. | ||
# | ||
# To enable this hook, rename this file to "query-watchman" and set | ||
# 'git config core.fsmonitor .git/hooks/query-watchman' | ||
# | ||
my ($version, $last_update_token) = @ARGV; | ||
|
||
# Uncomment for debugging | ||
# print STDERR "$0 $version $last_update_token\n"; | ||
|
||
# Check the hook interface version | ||
if ($version ne 2) { | ||
die "Unsupported query-fsmonitor hook version '$version'.\n" . | ||
"Falling back to scanning...\n"; | ||
} | ||
|
||
my $git_work_tree = get_working_dir(); | ||
|
||
my $retry = 1; | ||
|
||
my $json_pkg; | ||
eval { | ||
require JSON::XS; | ||
$json_pkg = "JSON::XS"; | ||
1; | ||
} or do { | ||
require JSON::PP; | ||
$json_pkg = "JSON::PP"; | ||
}; | ||
|
||
launch_watchman(); | ||
|
||
sub launch_watchman { | ||
my $o = watchman_query(); | ||
if (is_work_tree_watched($o)) { | ||
output_result($o->{clock}, @{$o->{files}}); | ||
} | ||
} | ||
|
||
sub output_result { | ||
my ($clockid, @files) = @_; | ||
|
||
# Uncomment for debugging watchman output | ||
# open (my $fh, ">", ".git/watchman-output.out"); | ||
# binmode $fh, ":utf8"; | ||
# print $fh "$clockid\n@files\n"; | ||
# close $fh; | ||
|
||
binmode STDOUT, ":utf8"; | ||
print $clockid; | ||
print "\0"; | ||
local $, = "\0"; | ||
print @files; | ||
} | ||
|
||
sub watchman_clock { | ||
my $response = qx/watchman clock "$git_work_tree"/; | ||
die "Failed to get clock id on '$git_work_tree'.\n" . | ||
"Falling back to scanning...\n" if $? != 0; | ||
|
||
return $json_pkg->new->utf8->decode($response); | ||
} | ||
|
||
sub watchman_query { | ||
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') | ||
or die "open2() failed: $!\n" . | ||
"Falling back to scanning...\n"; | ||
|
||
# In the query expression below we're asking for names of files that | ||
# changed since $last_update_token but not from the .git folder. | ||
# | ||
# To accomplish this, we're using the "since" generator to use the | ||
# recency index to select candidate nodes and "fields" to limit the | ||
# output to file names only. Then we're using the "expression" term to | ||
# further constrain the results. | ||
if (substr($last_update_token, 0, 1) eq "c") { | ||
$last_update_token = "\"$last_update_token\""; | ||
} | ||
my $query = <<" END"; | ||
["query", "$git_work_tree", { | ||
"since": $last_update_token, | ||
"fields": ["name"], | ||
"expression": ["not", ["dirname", ".git"]] | ||
}] | ||
END | ||
|
||
# Uncomment for debugging the watchman query | ||
# open (my $fh, ">", ".git/watchman-query.json"); | ||
# print $fh $query; | ||
# close $fh; | ||
|
||
print CHLD_IN $query; | ||
close CHLD_IN; | ||
my $response = do {local $/; <CHLD_OUT>}; | ||
|
||
# Uncomment for debugging the watch response | ||
# open ($fh, ">", ".git/watchman-response.json"); | ||
# print $fh $response; | ||
# close $fh; | ||
|
||
die "Watchman: command returned no output.\n" . | ||
"Falling back to scanning...\n" if $response eq ""; | ||
die "Watchman: command returned invalid output: $response\n" . | ||
"Falling back to scanning...\n" unless $response =~ /^\{/; | ||
|
||
return $json_pkg->new->utf8->decode($response); | ||
} | ||
|
||
sub is_work_tree_watched { | ||
my ($output) = @_; | ||
my $error = $output->{error}; | ||
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { | ||
$retry--; | ||
my $response = qx/watchman watch "$git_work_tree"/; | ||
die "Failed to make watchman watch '$git_work_tree'.\n" . | ||
"Falling back to scanning...\n" if $? != 0; | ||
$output = $json_pkg->new->utf8->decode($response); | ||
$error = $output->{error}; | ||
die "Watchman: $error.\n" . | ||
"Falling back to scanning...\n" if $error; | ||
|
||
# Uncomment for debugging watchman output | ||
# open (my $fh, ">", ".git/watchman-output.out"); | ||
# close $fh; | ||
|
||
# Watchman will always return all files on the first query so | ||
# return the fast "everything is dirty" flag to git and do the | ||
# Watchman query just to get it over with now so we won't pay | ||
# the cost in git to look up each individual file. | ||
my $o = watchman_clock(); | ||
$error = $output->{error}; | ||
|
||
die "Watchman: $error.\n" . | ||
"Falling back to scanning...\n" if $error; | ||
|
||
output_result($o->{clock}, ("/")); | ||
$last_update_token = $o->{clock}; | ||
|
||
eval { launch_watchman() }; | ||
return 0; | ||
} | ||
|
||
die "Watchman: $error.\n" . | ||
"Falling back to scanning...\n" if $error; | ||
|
||
return 1; | ||
} | ||
|
||
sub get_working_dir { | ||
my $working_dir; | ||
if ($^O =~ 'msys' || $^O =~ 'cygwin') { | ||
$working_dir = Win32::GetCwd(); | ||
$working_dir =~ tr/\\/\//; | ||
} else { | ||
require Cwd; | ||
$working_dir = Cwd::cwd(); | ||
} | ||
|
||
return $working_dir; | ||
} |
8 changes: 8 additions & 0 deletions
8
integrations/gitea-repositories-meta/user5/repo4.git/hooks/post-update.sample
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
# | ||
# An example hook script to prepare a packed repository for use over | ||
# dumb transports. | ||
# | ||
# To enable this hook, rename this file to "post-update". | ||
|
||
exec git update-server-info |
14 changes: 14 additions & 0 deletions
14
integrations/gitea-repositories-meta/user5/repo4.git/hooks/pre-applypatch.sample
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
# | ||
# An example hook script to verify what is about to be committed | ||
# by applypatch from an e-mail message. | ||
# | ||
# The hook should exit with non-zero status after issuing an | ||
# appropriate message if it wants to stop the commit. | ||
# | ||
# To enable this hook, rename this file to "pre-applypatch". | ||
|
||
. git-sh-setup | ||
precommit="$(git rev-parse --git-path hooks/pre-commit)" | ||
test -x "$precommit" && exec "$precommit" ${1+"$@"} | ||
: |
49 changes: 49 additions & 0 deletions
49
integrations/gitea-repositories-meta/user5/repo4.git/hooks/pre-commit.sample
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/sh | ||
# | ||
# An example hook script to verify what is about to be committed. | ||
# Called by "git commit" with no arguments. The hook should | ||
# exit with non-zero status after issuing an appropriate message if | ||
# it wants to stop the commit. | ||
# | ||
# To enable this hook, rename this file to "pre-commit". | ||
|
||
if git rev-parse --verify HEAD >/dev/null 2>&1 | ||
then | ||
against=HEAD | ||
else | ||
# Initial commit: diff against an empty tree object | ||
against=$(git hash-object -t tree /dev/null) | ||
fi | ||
|
||
# If you want to allow non-ASCII filenames set this variable to true. | ||
allownonascii=$(git config --type=bool hooks.allownonascii) | ||
|
||
# Redirect output to stderr. | ||
exec 1>&2 | ||
|
||
# Cross platform projects tend to avoid non-ASCII filenames; prevent | ||
# them from being added to the repository. We exploit the fact that the | ||
# printable range starts at the space character and ends with tilde. | ||
if [ "$allownonascii" != "true" ] && | ||
# Note that the use of brackets around a tr range is ok here, (it's | ||
# even required, for portability to Solaris 10's /usr/bin/tr), since | ||
# the square bracket bytes happen to fall in the designated range. | ||
test $(git diff --cached --name-only --diff-filter=A -z $against | | ||
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 | ||
then | ||
cat <<\EOF | ||
Error: Attempt to add a non-ASCII file name. | ||
|
||
This can cause problems if you want to work with people on other platforms. | ||
|
||
To be portable it is advisable to rename the file. | ||
|
||
If you know what you are doing you can disable this check using: | ||
|
||
git config hooks.allownonascii true | ||
EOF | ||
exit 1 | ||
fi | ||
|
||
# If there are whitespace errors, print the offending file names and fail. | ||
exec git diff-index --check --cached $against -- |
13 changes: 13 additions & 0 deletions
13
integrations/gitea-repositories-meta/user5/repo4.git/hooks/pre-merge-commit.sample
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
# | ||
# An example hook script to verify what is about to be committed. | ||
# Called by "git merge" with no arguments. The hook should | ||
# exit with non-zero status after issuing an appropriate message to | ||
# stderr if it wants to stop the merge commit. | ||
# | ||
# To enable this hook, rename this file to "pre-merge-commit". | ||
|
||
. git-sh-setup | ||
test -x "$GIT_DIR/hooks/pre-commit" && | ||
exec "$GIT_DIR/hooks/pre-commit" | ||
: |
53 changes: 53 additions & 0 deletions
53
integrations/gitea-repositories-meta/user5/repo4.git/hooks/pre-push.sample
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/sh | ||
|
||
# An example hook script to verify what is about to be pushed. Called by "git | ||
# push" after it has checked the remote status, but before anything has been | ||
# pushed. If this script exits with a non-zero status nothing will be pushed. | ||
# | ||
# This hook is called with the following parameters: | ||
# | ||
# $1 -- Name of the remote to which the push is being done | ||
# $2 -- URL to which the push is being done | ||
# | ||
# If pushing without using a named remote those arguments will be equal. | ||
# | ||
# Information about the commits which are being pushed is supplied as lines to | ||
# the standard input in the form: | ||
# | ||
# <local ref> <local sha1> <remote ref> <remote sha1> | ||
# | ||
# This sample shows how to prevent push of commits where the log message starts | ||
# with "WIP" (work in progress). | ||
|
||
remote="$1" | ||
url="$2" | ||
|
||
z40=0000000000000000000000000000000000000000 | ||
|
||
while read local_ref local_sha remote_ref remote_sha | ||
do | ||
if [ "$local_sha" = $z40 ] | ||
then | ||
# Handle delete | ||
: | ||
else | ||
if [ "$remote_sha" = $z40 ] | ||
then | ||
# New branch, examine all commits | ||
range="$local_sha" | ||
else | ||
# Update to existing branch, examine new commits | ||
range="$remote_sha..$local_sha" | ||
fi | ||
|
||
# Check for WIP commit | ||
commit=`git rev-list -n 1 --grep '^WIP' "$range"` | ||
if [ -n "$commit" ] | ||
then | ||
echo >&2 "Found WIP commit in $local_ref, not pushing" | ||
exit 1 | ||
fi | ||
fi | ||
done | ||
|
||
exit 0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.