Skip to content

Removable media support #16135

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

Closed
wants to merge 166 commits into from
Closed

Removable media support #16135

wants to merge 166 commits into from

Conversation

EndrII
Copy link
Contributor

@EndrII EndrII commented Jun 11, 2021

Note

The snap version of the gitia are most convenient way to quickly install the gitea service. But snap version can not get accses to removable devices. For example mounted external drives. So it is looks as a bug, so i create this PR to v1.14 branch.

Descritpion

Added support removable media for snap version of gitia.
For get more info about removable media interface see the snapcraft documentation

6543 and others added 30 commits March 20, 2021 09:37
* Fix bug when upload on web

* move into own function

Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: zeripath <[email protected]>
* Update release date

* Remove unneeded entry
* move "copy uploaded lfs files 2 repo" to own function for "defer file.Close()"

* rm type overload

Co-authored-by: zeripath <[email protected]>
…a#15091)

- Add missing markdown class for rendered markdown.
- Increase font size of milestone name in list.

Fixes: go-gitea#15046
…go-gitea#15094)

Backport go-gitea#15085

There are a few recurrent issues with comment as diff reporting panics that are resistant to fixing due to the fact that the panic occurs in the template render and is swallowed by the template renderer.

This PR just adds some logging to force the panic to properly logged and re-propagates back up to the template renderer so we can actually detect what the issue is.

Signed-off-by: Andrew Thornton [email protected]
…itea#15100)

* Fix lock modal content rendering outside modal

The .content was not a child to .modal so was rendering outside. This is
a recent regression but I'm not certain when it was introduced.

* remove extraneous closing div

Co-authored-by: zeripath <[email protected]>
Backport go-gitea#15110

There is a serious issue with the v176 migration where there is a mistaken missing
label_id selection.

Signed-off-by: Andrew Thornton <[email protected]>
* upgraded code.gitea.io/sdk/gitea v0.13.2 => v0.14.0

* rm workaround
In my last fix I missed adding the label_ prefix to the
consistency check count.

Signed-off-by: Andrew Thornton <[email protected]>
Backport go-gitea#15131

Whilst creating a test for v176 in the migrations_test PR
it has become clear that this was still wrong.

This is now fixed. Genuinely.

Also fix repo transfer

Signed-off-by: Andrew Thornton <[email protected]>
The API call: GET /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments
returns always the reviewer, but should return the poster.

Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>
Backport go-gitea#15160

Clusterfuzz found another way so I found another way to stop it

Signed-off-by: Andrew Thornton <[email protected]>
fix go-gitea#15184

Signed-off-by: a1012112796 <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>
…teractive sessions (go-gitea#15210) (go-gitea#15211)

Backport go-gitea#15210

Unfortunately go-gitea#14623 changed from the deprecated IsInteractiveSession to
IsWindowsService without recognising that they are the complement of
each other.

This means that Windows SVC control is not working correctly. This PR
adds some Tracing statements but also fixes the bug.

Fix go-gitea#15159

Signed-off-by: Andrew Thornton <[email protected]>
…a#15179) (go-gitea#15192)

Backport go-gitea#15179

/api/v1/repos/issues/search is a highly inefficient search which is unfortunately
the basis for our dependency searching algorithm. In particular it currently loads
all of the repositories and their owners and their primary coding language all of
which is immediately thrown away.

This PR makes one simple change - just get the IDs.

Related go-gitea#14560
Related go-gitea#12827

Signed-off-by: Andrew Thornton <[email protected]>
- Fix misaligned "Show Outdated" buttons via flexbox
- Add hover effect to "Show Outdated" buttons
- Remove overreaching margin from selector .diff-file-box and handle
  cases individually.

Fixes: go-gitea#15097

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
…o-gitea#15200)

Backport go-gitea#15199

I do not understand how this can happen or why.

There is an apparent possibility for a comment.Patch to be missing a hunk header
- this should not happen and do not understand how. But it appears to happen on
1.13 at least in some case.

This PR will simply add a new section if the cursection is empty
thus preventing the NPE.

Fix go-gitea#15198

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: 6543 <[email protected]>
Backport go-gitea#15213

`enry.IsVendor` is kinda slow as it simply iterates across all regexps.
This PR ajdusts the regexps to combine them to make this process a
little quicker.

Related go-gitea#15143

Signed-off-by: Andrew Thornton <[email protected]>
techknowlogick and others added 13 commits May 27, 2021 10:02
Fix go-gitea#15972

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>

Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
…6037) (go-gitea#16039)

Backport go-gitea#16037

The i_like_gitea cookie appears to be missing the SameSite settings. I think they
were present at some point but may have been removed in a merge.

This PR ensures that they are set.

Fix go-gitea#15972

Signed-off-by: Andrew Thornton <[email protected]>
Backport go-gitea#16045

If you change the case of a username the change needs to be propagated to their
repositories.

Signed-off-by: Andrew Thornton <[email protected]>
…itea#15902) (go-gitea#16082)

* don't prompt interactively for clone credentials

* apply GIT_TERMINAL_PROMPT=0 to all git cmds

Co-authored-by: Lunny Xiao <[email protected]>

Co-authored-by: Norwin <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
…#16081)

Co-authored-by: 6543 <[email protected]>
Co-authored-by: Norwin <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
…ranch don't close related PRs (go-gitea#16067) (go-gitea#16097)

* Fix bug when delete branch don't close related PRs

* Merge all deletebranch as one method

Co-authored-by: Lauris BH <[email protected]>
* Fix http path bug

* Add missed request

* add tests

Co-authored-by: 6543 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
* Fix data URI scramble (go-gitea#16098)

* Removed unused method.

* No prefix for data uris.

* Added test to prevent regressions.

Co-authored-by: KN4CK3R <[email protected]>
* Fix bug on getIssueIDsByRepoID

* Add test
…o-gitea#16123)

In go-gitea#16055 it appears that the simple 5s deadline doesn't work for large
file writes. Now we can't - or at least shouldn't just set no deadline
as go will happily let these connections block indefinitely. However,
what seems reasonable is to set some minimum rate we expect for writing.

This PR suggests the following algorithm:

* Every write has a minimum timeout of 5s (adjustable at compile time.)
* If there has been a previous write - then consider its previous
deadline, add half of the minimum timeout + 2s per kb about to written.
* If that new deadline is after the minimum timeout use that.

Fix go-gitea#16055

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: 6543 <[email protected]>
Add support removable media for snap version of gitia.
for get more info about removable media interface see the snapcraft [documentation](https://snapcraft.io/docs/removable-media-interface)
@6543 6543 added topic/distribution This PR changes something about the packaging of Gitea type/enhancement An improvement of existing functionality labels Jun 11, 2021
@6543 6543 modified the milestones: 1.15.0, 1.14.4 Jun 11, 2021
@6543
Copy link
Member

6543 commented Jun 11, 2021

@EndrII could you target main first, if it got merged it will be backported to 1.14

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 11, 2021
@EndrII
Copy link
Contributor Author

EndrII commented Jun 11, 2021

@EndrII could you target main first, if it got merged it will be backported to 1.14

okay, no problem

@EndrII EndrII changed the base branch from release/v1.14 to main June 11, 2021 14:03
@EndrII
Copy link
Contributor Author

EndrII commented Jun 11, 2021

ups

@EndrII
Copy link
Contributor Author

EndrII commented Jun 11, 2021

i reopen this PR for main branch

@EndrII EndrII closed this Jun 11, 2021
@EndrII
Copy link
Contributor Author

EndrII commented Jun 11, 2021

See #16136 PR

@zeripath zeripath removed this from the 1.15.0 milestone Jun 27, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. topic/distribution This PR changes something about the packaging of Gitea type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.