0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-12 12:21:43 +01:00
gitea/modules/git
Mario Lubenka 61db834904 Change target branch for pull request (#6488)
* Adds functionality to change target branch of created pull requests

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use const instead of var in JavaScript additions

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Check if branches are equal and if PR already exists before changing target branch

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Make sure to check all commits

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Print error messages for user as error flash message

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Disallow changing target branch of closed or merged pull requests

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Resolve conflicts after merge of upstream/master

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Change order of branch select fields

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Removes duplicate check

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use ctx.Tr for translations

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Recompile JS

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Use correct translation namespace

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Remove redundant if condition

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Moves most change branch logic into pull service

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Completes comment

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Add Ref to ChangesPayload for logging changed target branches
instead of creating a new struct

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Revert changes to go.mod

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Directly use createComment method

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Return 404 if pull request is not found. Move written check up

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Remove variable declaration

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Return client errors on change pull request target errors

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Return error in commit.HasPreviousCommit

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adds blank line

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Test patch before persisting new target branch

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Update patch before testing (not working)

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Removes patch calls when changeing pull request target

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Removes unneeded check for base name

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Moves ChangeTargetBranch completely to pull service. Update patch status.

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Set webhook mode after errors were validated

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Update PR in one transaction

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Move logic for check if head is equal with branch to pull model

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adds missing comment and simplify return

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>

* Adjust CreateComment method call

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
2019-12-16 14:20:25 +08:00
..
pipeline
tests/repos
blame_test.go
blame.go Graceful: Cancel Process on monitor pages & HammerTime (#9213) 2019-11-30 16:40:22 +02:00
blob_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
blob.go Expand/Collapse Files and Blob Excerpt while Reviewing/Comparing code (#8924) 2019-11-15 10:52:59 +08:00
cache.go
command_test.go Fix nondeterministic behavior (#9341) 2019-12-13 17:03:38 +08:00
command.go Fix nondeterministic behavior (#9341) 2019-12-13 17:03:38 +08:00
commit_archive.go
commit_info_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
commit_info.go
commit_test.go
commit.go Change target branch for pull request (#6488) 2019-12-16 14:20:25 +08:00
error.go
git_test.go Graceful: Xorm, RepoIndexer, Cron and Others (#9282) 2019-12-15 09:51:28 +00:00
git.go Graceful: Xorm, RepoIndexer, Cron and Others (#9282) 2019-12-15 09:51:28 +00:00
hook.go
notes_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
notes.go
parse_test.go
parse.go
README.md
ref.go
repo_attribute.go Make repository management section handle lfs locks (#8726) 2019-12-12 21:18:07 +08:00
repo_blame.go
repo_blob_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
repo_blob.go
repo_branch_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
repo_branch.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
repo_commit_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
repo_commit.go
repo_commitgraph.go
repo_compare_test.go Remove SavePatch and generate patches on the fly (#9302) 2019-12-13 23:21:06 +01:00
repo_compare.go Remove SavePatch and generate patches on the fly (#9302) 2019-12-13 23:21:06 +01:00
repo_gpg.go
repo_hook.go
repo_index.go
repo_object.go
repo_ref_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
repo_ref.go
repo_stats_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
repo_stats.go
repo_tag_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
repo_tag.go
repo_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
repo_tree.go
repo.go Variable expansion in repository templates (#9163) 2019-11-30 01:54:47 -05:00
sha1.go
signature.go
submodule_test.go
submodule.go
tag.go
tree_blob.go
tree_entry_test.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
tree_entry.go
tree.go
utils.go Move mirror sync actions to notification (#9022) 2019-11-24 00:16:59 -05:00

Git Module

This module is merged from https://github.com/go-gitea/git which is a Go module to access Git through shell commands. Now it's a part of gitea's main repository for easier pull request.