Skip to content
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

add .gpg url (match github behaviour) #6610

Merged
merged 18 commits into from
Apr 14, 2019

Conversation

sapk
Copy link
Member

@sapk sapk commented Apr 14, 2019

After some testing of #4193 I added what was missing to have it working. Thx to @techknowlogick that lay down most of the bases.

Basically, we haven't in database what is needed to fully reconstruct the gpg armored export (ex: signature, full identities, ...).
I add a table containing the imported armored key that we can re-used to be join with others imported keys and exported.
Like github previous keys that need re-import are marked as a header (ex: https://github.com/sapk.gpg)

The only bug is that the cipherTypeByte are changed by the export by golang compared to the imported one but that doesn't change the interpretation of the gpg armored key.

@techknowlogick
Copy link
Member

@sapk Thanks for continuing this PR 😃

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 14, 2019
@sapk
Copy link
Member Author

sapk commented Apr 14, 2019

For info, imported vs exported key

@codecov-io
Copy link

codecov-io commented Apr 14, 2019

Codecov Report

Merging #6610 into master will increase coverage by <.01%.
The diff coverage is 43.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6610      +/-   ##
==========================================
+ Coverage   40.47%   40.48%   +<.01%     
==========================================
  Files         405      406       +1     
  Lines       54388    54484      +96     
==========================================
+ Hits        22012    22056      +44     
- Misses      29349    29390      +41     
- Partials     3027     3038      +11
Impacted Files Coverage Δ
models/migrations/migrations.go 1.52% <ø> (ø) ⬆️
models/user.go 49.76% <ø> (ø) ⬆️
models/error.go 34.06% <0%> (-0.42%) ⬇️
models/migrations/v84.go 0% <0%> (ø)
models/models.go 56.59% <100%> (+0.18%) ⬆️
models/gpg_key.go 53.37% <39.62%> (-1.87%) ⬇️
routers/user/home.go 37.63% <46.87%> (+0.7%) ⬆️
routers/user/profile.go 35.77% <90.9%> (+2.44%) ⬆️
modules/log/event.go 65.98% <0%> (+1.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38889f0...308d7f3. Read the comment docs.

@techknowlogick techknowlogick added the type/enhancement An improvement of existing functionality label Apr 14, 2019
@techknowlogick techknowlogick added this to the 1.9.0 milestone Apr 14, 2019
@lunny
Copy link
Member

lunny commented Apr 14, 2019

@sapk @techknowlogick good work. With integration tests are better.

@sapk
Copy link
Member Author

sapk commented Apr 14, 2019

@lunny done

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 14, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 14, 2019
@techknowlogick techknowlogick merged commit d699de3 into go-gitea:master Apr 14, 2019
@sapk sapk deleted the export_gpg_keys branch April 14, 2019 17:46
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants