Add agit flow support in gitea #14295
Conversation
ref: https://git-repo.info/en/2020/03/agit-flow-and-git-repo/ example: ```Bash git checkout -b test echo "test" >> README.md git commit -m "test" git push origin HEAD:refs/for/master -o topic=test ``` Signed-off-by: a1012112796 <[email protected]>
* master: [skip ci] Updated licenses and gitignores
Codecov Report
@@ Coverage Diff @@
## master #14295 +/- ##
==========================================
- Coverage 42.21% 42.03% -0.19%
==========================================
Files 767 768 +1
Lines 81624 82118 +494
==========================================
+ Hits 34458 34515 +57
- Misses 41531 41944 +413
- Partials 5635 5659 +24
Continue to review full report at Codecov.
|
@jiangxin Could we ask you to help to review this PR? |
* master: Fixed irritating error message related to go version (#14611) Use OldRef instead of CommitSHA for DeleteBranch comments (#14604) Add information on how to build statically (#14594) [skip ci] Updated translations via Crowdin Exclude the current dump file from the dump (#14606) Remove spurious DataAsync Error logging (#14599) [API] Add delete release by tag & fix unreleased inconsistency (#14563) Fix rate limit bug when downloading assets on migrating from github (#14564) [API] Add affected files of commits to commit struct (#14579)
* master: Add support for ref parameter to get raw file API (#14602)
|
||
const VersionHead string = "version=1" | ||
|
||
if !strings.HasPrefix(rs.Data, VersionHead) { |
jiangxin
Feb 9, 2021
You should split rs.Data
by the NUL character ('\0'). Part one is version, and part two is capabilities.
You should split rs.Data
by the NUL character ('\0'). Part one is version, and part two is capabilities.
|
||
hasPushOptions := false | ||
response := []byte(VersionHead) | ||
if strings.Contains(rs.Data, "push-options") { |
jiangxin
Feb 9, 2021
You should split capabilities using space character, and try to match each capability.
If there is a new capability called "push-options-v2", using string.Contains
is wrong.
You should split capabilities using space character, and try to match each capability.
If there is a new capability called "push-options-v2", using string.Contains
is wrong.
It's not good to have a merge commit for others to review, so please rebase your topic. |
@jiangxin Thanks for your carefully check, I will change them soon. |
@jiangxin Another question, I know your designed style to create pull request is |
When push to an empty repository, an error returned |
Another two problems:
|
Maybe you should rewrite the gitea hooks on migrations if git version matched. |
I think just add a note on blog is enough |
@a1012112796 well since we check for the git version and assume if it is high enough we do recive proc-receive. |
Willn't, Because will check permission in |
Please change more |
make L-G-T-M work. |
|
ref: https://git-repo.info/en/2020/03/agit-flow-and-git-repo/
examle:

NOTICE: All existed repositories will not have the new hooks, you have to rewrite the hooks via admin panel.