* Allow git.GetTree to take both commit and tree names, return full paths on entries listed through Tree.ListEntriesRecursive
Signed-off-by: Filip Navara <[email protected]>
* Fix the SHA returned on Git Tree APIs called with commit hash or symbolic name
Signed-off-by: Filip Navara <[email protected]>
Although #591 attempted to make version hashes be preceded with tag names on our branch builds, it would fail again silently at 50 commits because we were not cloning the full branch. Drone's new plugin will do a single branch clone by default meaning that depth is no longer necessary.
* Improve issue reference on commit
Allow commits to properly reference issues in other repositories and also to
close/reopen those issues if user has code permission. Should match
Github behavior described here: https://help.github.com/en/articles/closing-issues-using-keywords
Fixes 6664
* Fix missing return
* Match user/repo directly in regex
Ensures correctly traversing the commit graph for all path and avoids
erroneously skipping some. Also preallocate some arrays to correct size
to prevent unnecessary reallocations.
Fixes#6708.
Signed-off-by: Filip Navara <[email protected]>
* detect and remove a decoded BOM
Signed-off-by: Andrew Thornton <[email protected]>
* Restore the previous encoding and BOM
* On error keep as UTF-8
Signed-off-by: Andrew Thornton <[email protected]>
* create remove BOM function
* Deal with LFSed content
* Update modules/repofiles/update.go
* Fix final LFS bug
* Keep LFS sections referring to opts.Content
* fix org visibility bug
* fix permission check
* add integration tests
* fix tests
* change test user name for easier maintainance and fix test
* fix test git repo name
Add support for repo_redirect objects in the git smart http
handler so that when a user clones a repo that has been moved
or renamed, they are redirected to the new location.
This requires that the query string be included in the redirect
as well, so that is added.
Signed-off-by: James E. Blair <[email protected]>
* Add log.ColorFormat and log.ColorFormatted
Structs can now implement log.ColorFormatted to provide their own
colored format when logged with `%-v` or additional flags.
Signed-off-by: Andrew Thornton <[email protected]>
* Add basic ColorFormat to repository and user
Signed-off-by: Andrew Thornton <[email protected]>
* Add basic ColorFormat to access and unit
Signed-off-by: Andrew Thornton <[email protected]>
* Add ColorFormat to permission and on trace log it
Signed-off-by: Andrew Thornton <[email protected]>
* Add log.NewColoredIDValue to make ID value coloring consistent
Signed-off-by: Andrew Thornton <[email protected]>
* formatting changes
* Add some better tracing to permission denied for read issues/pulls
Signed-off-by: Andrew Thornton <[email protected]>
* Add Trace logging on permission denied
Signed-off-by: Andrew Thornton <[email protected]>
* Remove isTrace() check from deferred func
* Adjust repo and allow logging of team
* use FormatInt instead of Itoa
* Add blank line
Signed-off-by: Andrew Thornton <[email protected]>
* Update access.go
* Fix flaw in the commit history lookup that caused unnecessary traversal
when the repository contains a lot of merge commits.
Also return the merge commit as the changed one if the file or
directory was changed as part of the merge, eg. through conflict
resolution.
Signed-off-by: Filip Navara <[email protected]>
* Perform history simplification. If a file is present on multiple parents
in a merge commit follow only the first parent.
* Show button to delete a pull request branch after a pull request has been closed (#6570)
Signed-off-by: Mario Lubenka <[email protected]>
* Update routers/repo/pull.go
Co-Authored-By: saitho <[email protected]>
* Unfortunately MemProvider Init does not actually Init properly
Worse all of its members are private and you cannot update them.
Simple fix copy it in to modules session.
Signed-off-by: Andrew Thornton <[email protected]>
* Fix misspelling