summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix link in mirror docs (#26719)silverwind2023-08-251-1/+1
| | | | | Fix hash fragment in this link Co-authored-by: Giteabot <teabot@gitea.io>
* Add `eslint-plugin-vue-scoped-css` (#26720)silverwind2023-08-254-23/+210
| | | | | | | | | | Adds [eslint-plugin-vue-scoped-css](https://github.com/future-architect/eslint-plugin-vue-scoped-css) and fixes discovered issues which are: - 1 unused selector - 3 selectors with `.full.height` parent in a `<style scoped>` block so the rule could not find the parent. Move these into the unscoped block instead. They worked before and after.
* Fixed text overflow in dropdown menu (#26694)Viktor Suprun2023-08-251-0/+5
| | | | | | | | Fixes #26622 ![image](https://github.com/go-gitea/gitea/assets/683358/168b7e4d-97ba-4b5f-a5f5-33ee67e8b4be) Co-authored-by: Giteabot <teabot@gitea.io>
* Make web context initialize correctly for different cases (#26726)wxiaoguang2023-08-2511-54/+50
| | | | | | | The web context (modules/context.Context) is quite complex, it's difficult for the callers to initialize correctly. This PR introduces a `NewWebContext` function, to make sure the web context have the same behavior for different cases.
* Remove incorrect CSS helper classes (#26712)wxiaoguang2023-08-255-29/+21
|
* Focus editor on "Write" tab click (#26714)silverwind2023-08-251-0/+6
| | | | | Focus the editor when clicking the "Write" tab. Works for both Textarea and EasyMDE. Does for some reason not work without the `requestAnimationFrame`.
* Fix review bar misalignment (#26711)wxiaoguang2023-08-242-11/+7
|
* Use "small-loading-icon" insead of "btn-octicon is-loading" (#26710)wxiaoguang2023-08-242-9/+2
| | | | | | | | The "btn-octicon is-loading" was introduced by #21842 , it is only used by the "Copy Content" button, but the "btn-octicon" selector would affect too many uncertain elements. Now there is a general "small-loading-icon" class, so the "btn-octicon is-loading" could be removed.
* Improve Image Diff UI (#26696)wxiaoguang2023-08-243-11/+16
| | | | | 1. Use `is-loading` instead of `ui loader` 2. Introduce class name `image-diff-tabs`, instead of searching `gt-hidden`, which is fragile 3. Align the UI elements, see the screenshots.
* Make issue template field template access correct template data (#26698)wxiaoguang2023-08-241-2/+1
| | | Regression of #23092, the `{{$field := .}}` was missing during that refactoring.
* add Upload URL to release API (#26663)Earl Warren2023-08-246-0/+79
| | | | | | | | | | | | - Resolves https://codeberg.org/forgejo/forgejo/issues/580 - Return a `upload_field` to any release API response, which points to the API URL for uploading new assets. - Adds unit test. - Adds integration testing to verify URL is returned correctly and that upload endpoint actually works --------- Co-authored-by: Gusted <postmaster@gusted.xyz>
* Add merge files files to GetCommitFileStatus (#20515)Laurent Cahour2023-08-2422-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, We'd like to add merge files files to GetCommitFileStatus fucntions so API returns the list of all the files associated to a merged pull request commit, like GitHub API does. The list of affectedFiles for an API commit is fetched from toCommit() function in routers/api/v1/repo/commits.go, and API was returning no file in case of a pull request with no conflict, or just files associated to the confict resolution, but NOT the full list of merged files. This would lead to situations where a CI polling a repo for changes could miss some file changes due to API returning an empty / partial list in case of such merged pull requests. (Hope this makes sense :) ) NOTE: I'd like to add a unittest in integrations/api_repo_git_commits_test.go but failed to understand how to add my own test bare repo so I can make a test on a merged pull request commit to check for affectedFiles. Is there a merged pull request in there that I could use maybe? Could someone please direct me to the relevant ressources with informations on how to do that please? Thanks for your time, Laurent. --------- Co-authored-by: Thomas Desveaux <desveaux.thomas@gmail.com>
* PATCH branch-protection updates check list even when checks are disabled ↵Infinoid2023-08-242-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | (#26351) Fixes: #26333. Previously, this endpoint only updates the `StatusCheckContexts` field when `EnableStatusCheck==true`, which makes it impossible to clear the array otherwise. This patch uses slice `nil`-ness to decide whether to update the list of checks. The field is ignored when either the client explicitly passes in a null, or just omits the field from the json ([which causes `json.Unmarshal` to leave the struct field unchanged](https://go.dev/play/p/Z2XHOILuB1Q)). I think this is a better measure of intent than whether the `EnableStatusCheck` flag was set, because it matches the semantics of other field types. Also adds a test case. I noticed that [`testAPIEditBranchProtection` only checks the branch name](https://github.com/go-gitea/gitea/blob/c1c83dbaec840871c1247f4bc3f875309b0de6bb/tests/integration/api_branch_test.go#L68) and no other fields, so I added some extra `GET` calls and specific checks to make sure the fields are changing properly. I added those checks the existing integration test; is that the right place for it?
* Add `member`, `collaborator`, `contributor`, and `first-time contributor` ↵yp053272023-08-245-64/+97
| | | | | | | | | | | | | | | | | roles and tooltips (#26658) GitHub like role descriptor ![image](https://github.com/go-gitea/gitea/assets/18380374/ceaed92c-6749-47b3-89e8-0e0e7ae65321) ![image](https://github.com/go-gitea/gitea/assets/18380374/8193ec34-cbf0-47f9-b0de-10dbddd66970) ![image](https://github.com/go-gitea/gitea/assets/18380374/56c7ed85-6177-425e-9f2f-926e99770782) --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* chore(actions): support cron schedule task (#26655)Lunny Xiao2023-08-2413-9/+693
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace #22751 1. only support the default branch in the repository setting. 2. autoload schedule data from the schedule table after starting the service. 3. support specific syntax like `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly` ## How to use See the [GitHub Actions document](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) for getting more detailed information. ```yaml on: schedule: - cron: '30 5 * * 1,3' - cron: '30 5 * * 2,4' jobs: test_schedule: runs-on: ubuntu-latest steps: - name: Not on Monday or Wednesday if: github.event.schedule != '30 5 * * 1,3' run: echo "This step will be skipped on Monday and Wednesday" - name: Every time run: echo "This step will always run" ``` Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com> --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* feat(API): update and delete secret for managing organization secrets (#26660)Bo-Yi Wu2023-08-246-1/+272
| | | | | | | | | | | | | | | | | | - Add `UpdateSecret` function to modify org or user repo secret - Add `DeleteSecret` function to delete secret from an organization - Add `UpdateSecretOption` struct for updating secret options - Add `UpdateOrgSecret` function to update a secret in an organization - Add `DeleteOrgSecret` function to delete a secret in an organization GitHub API 1. Update Org Secret: https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#create-or-update-an-organization-secret 2. Delete Org Secret: https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28#delete-an-organization-secret --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Remove ref name in PR commits page (#25876)yp053272023-08-242-7/+4
| | | | | | | | | | | | | | | | | | | | The branch name display here is based on the repo's default branch which is not correct. ![image](https://github.com/go-gitea/gitea/assets/18380374/d899f6dc-b240-41ea-9a3e-ea0e103874ad) For example, if I changed the default branch, the branch name here will also be changed: ![image](https://github.com/go-gitea/gitea/assets/18380374/032ead94-2287-4158-a9e4-02e9fb74777d) ![image](https://github.com/go-gitea/gitea/assets/18380374/e1e6cbbc-31f8-40a2-b99a-508b5b2b3145) you can confirm this in : https://try.gitea.io/yp05327/testrepo/pulls/1/commits I think we do not need to display branch name here, as we already have the branch info above. ![image](https://github.com/go-gitea/gitea/assets/18380374/66f30a0c-3c2b-4d26-936d-bbe289f33be0)
* Modify the content format of the Feishu webhook (#25106)谈笑风生间2023-08-244-15/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | close https://github.com/go-gitea/gitea/issues/24368 ## what my pull request does Since the official documentation states that custom bots do not support hyperlink functionality, simply adding it without making some formatting changes would result in an unappealing output. Therefore, I have modified the formatting of the output. Currently, it is only used for Feishu. --- [docs](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json#%E8%B6%85%E9%93%BE%E6%8E%A5%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E) <img width="641" alt="image" src="https://github.com/go-gitea/gitea/assets/75628309/360e1c81-ab64-4ef6-851e-aa450d6e85a4"> - Issue <img width="423" alt="image" src="https://github.com/go-gitea/gitea/assets/75628309/519f6fae-81ab-4ec8-89b8-f6a73ff93783"> - Issue Comment <img width="548" alt="image" src="https://github.com/go-gitea/gitea/assets/75628309/749c0d1c-3657-431e-b787-8bf4c23cce83"> - Assign <img width="431" alt="image" src="https://github.com/go-gitea/gitea/assets/75628309/066f99e5-eabb-455d-91fb-a8359cc26dc7"> <img width="457" alt="image" src="https://github.com/go-gitea/gitea/assets/75628309/c6c10f99-db83-46ef-a775-4c91979fa68f"> - Merge <img width="408" alt="image" src="https://github.com/go-gitea/gitea/assets/75628309/e627bf43-5954-45aa-acf6-261ee046802f"> - PullRequest <img width="425" alt="image" src="https://github.com/go-gitea/gitea/assets/75628309/72cfa714-d3fa-4fb9-abdd-e8508d756056">
* Handle "comment form combo editor init" more gracefully (#26688)wxiaoguang2023-08-231-2/+3
| | | | | Now Gitea exposes unhandled promise rejection messages as error message on the UI. The "comment form" was quite unclear before, so it should be handled more gracefully to avoid such error.
* Prefer variables over subprocesses (#26690)Thomas McWork2023-08-231-3/+3
| | | | … because it doesn't require a separate shell, spawning a process which cost unnecessary resources and takes time.
* Fix archived unix time when archiving the label (#26681)puni98692023-08-231-3/+4
| | | | | Small Fix :-`ArchivedUnix` column changed only change the date when it is newly archived. Co-authored-by: Giteabot <teabot@gitea.io>
* Make "link-action" backend code respond correct JSON content (#26680)wxiaoguang2023-08-238-8/+8
| | | | | Otherwise the `link-action` JS code couldn't parse the response. Co-authored-by: Giteabot <teabot@gitea.io>
* Fix doubled box-shadow in branch dropdown menu (#26678)wxiaoguang2023-08-232-2/+2
|
* Refactor toast module (#26677)wxiaoguang2023-08-233-20/+15
| | | | 1. Do not use "async" 2. Call `hideToast` instead of `removeElement` for manual closing
* More improvements for the "flex list" and the dashboard list (#26675)wxiaoguang2023-08-234-24/+19
| | | Follow #26649 and #25790 and add one more example (text truncate) in the devtest page
* Fix counting and filtering on the dashboard page for issues (#26657)Jason Song2023-08-235-110/+187
| | | | | | | | | | | | | | | | | | This PR has multiple parts, and I didn't split them because it's not easy to test them separately since they are all about the dashboard page for issues. 1. Support counting issues via indexer to fix #26361 2. Fix repo selection so it also fixes #26653 3. Keep keywords in filter links. The first two are regressions of #26012. After: https://github.com/go-gitea/gitea/assets/9418365/71dfea7e-d9e2-42b6-851a-cc081435c946 Thanks to @CaiCandong for helping with some tests.
* add mfa doc (#26654)Lunny Xiao2023-08-221-0/+35
| | | | | | | | | | | | | | | copy and modified from #14572 > Whilst debating enforcing MFA within our team, I realised there isn't a lot of context to the side effects of enabling it. Most of us use Git over HTTP and would need to add a token. I plan to add another PR that adds a sentence to the UI about needing to generate a token when enabling MFA if HTTP is to be used. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
* [Refactor] getIssueStatsChunk to move inner function into own one (#26671)65432023-08-221-48/+49
| | | | | | | move inner **countSession** of **getIssueStatsChunk** into it's own function for reuse --- *Sponsored by Kithara Software GmbH*
* Use line-height: normal by default (#26635)wxiaoguang2023-08-222-6/+2
| | | Fix #26537 again because 1.15 is too small for some fonts.
* Improve repo sub menu (#26531)yp053272023-08-221-4/+4
| | | | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/9e71282c-4645-45f3-bdb8-13c4333f7c2b) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/656ff837-35cf-43f8-88d0-f5e123600e57) Icons are not in the middle of the line.
* Fix organization list in dashboard (#26650)yp053272023-08-221-3/+7
| | | | | | | | | | | Fix ui problem comes from #26326 Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/c59264c9-ed63-48ae-8f76-779058e4b226) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/77d69274-6988-494a-970a-42fe69767e1e)
* Improve show role (#26621)yp053272023-08-223-61/+23
| | | Add a general show role template.
* Improve some flex layouts (#26649)wxiaoguang2023-08-224-63/+96
| | | | | | | | Fix #26617 1. Separate the "flex-list" examples into a dedicated template, and add some more examples 2. Use `flex-basis` instead of `flex-shrink` for `flex-item-trailing`, to avoid wrapping the texts too aggressively 3. Some `flex-wrap: wrap;` are removed
* feat: implement organization secret creation API (#26566)Bo-Yi Wu2023-08-227-7/+161
| | | | | | | | | | | | | - Add a new `CreateSecretOption` struct for creating secrets - Implement a `CreateOrgSecret` function to create a secret in an organization - Add a new route in `api.go` to handle the creation of organization secrets - Update the Swagger template to include the new `CreateOrgSecret` API endpoint --------- Signed-off-by: appleboy <appleboy.tw@gmail.com>
* Check disabled workflow when rerun jobs (#26535)yp053272023-08-227-100/+76
| | | | | | | | In GitHub, we can not rerun jobs if the workflow is disabled. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update minimum password length requirements (#25946)techknowlogick2023-08-214-5/+5
|
* cynkra is covered via oc links now (#26641)techknowlogick2023-08-211-3/+2
|
* update config docs url (#26640)techknowlogick2023-08-211-1/+1
|
* devpod use go1.21 (#26637)techknowlogick2023-08-211-1/+1
|
* Use correct minio error (#26634)delvh2023-08-211-2/+2
| | | | | | | | | | | Previously, `err` was defined above, checked for `err == nil` and used nowhere else. Hence, the result of `convertMinioErr` would always be `nil`. This leads to a NPE further down the line. That is not intentional, it should convert the error of the most recent operation, not one of its predecessors. Found through https://discord.com/channels/322538954119184384/322538954119184384/1143185780206993550.
* Remove avatarHTML from template helpers (#26598)wxiaoguang2023-08-212-2/+1
| | | | | | The HTML code is more readable and more correct (it needs `"ui avatar"` class) Co-authored-by: Giteabot <teabot@gitea.io>
* Add optimistic lock to ActionRun table (#26563)Jason Song2023-08-215-25/+53
| | | | | | | | | Should fix #26559. How xorm works: https://xorm.io/docs/chapter-06/1.lock/ --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Improve the branch selector tab UI (#26631)wxiaoguang2023-08-212-22/+39
|
* Improve translation of milestone filters (#26569)CaiCandong2023-08-212-4/+4
| | | | | | | | | | | | | https://github.com/go-gitea/gitea/issues/26567#issue-1855312074 > The terms `closest` and `furthest` don't describe the actual sorting behavior as these two are semantically relative to the current date. > Could we switch to `earliest` and `latest` instead? close #26567 --------- Co-authored-by: yp05327 <576951401@qq.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Add `branch_filter` to hooks API endpoints (#26599)Yarden Shoham2023-08-213-0/+6
| | | | | | | | | | | | | | | | | | We now include the branch filler in the response. - Closes #26591 # Before ![image](https://github.com/go-gitea/gitea/assets/20454870/73933940-c1a7-4573-abae-f340b63028b2) # After ![image](https://github.com/go-gitea/gitea/assets/20454870/3b3c4a85-0f7c-48c7-8617-def7a66c671d) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Replace box-shadow for `floating` dropdown as well (#26581)silverwind2023-08-212-1/+5
| | | | | | | | | | | | | Add `box-shadow` replacement to the `floating` dropdown variant as well, which was missed in https://github.com/go-gitea/gitea/pull/26469. The Fomantic style has `!important`, so this has to have too. Also made a tiny adjustment to shadow color on dark theme. <img width="305" alt="Screenshot 2023-08-18 at 16 40 34" src="https://github.com/go-gitea/gitea/assets/115237/a0aac9cb-6393-4d69-b0b3-00eaac5ccf9f"> <img width="202" alt="Screenshot 2023-08-18 at 16 40 22" src="https://github.com/go-gitea/gitea/assets/115237/0a5fa3aa-7452-4dbd-86ed-ccbc1c872ebb"> Co-authored-by: Giteabot <teabot@gitea.io>
* Add link to job details and tooltip to commit status in repo list in ↵yp053272023-08-216-10/+36
| | | | | | | | | | | dashboard (#26326) Tooltip: ![image](https://github.com/go-gitea/gitea/assets/18380374/237cb545-7844-424b-b995-1008eaaaedec) Link to the target job: ![image](https://github.com/go-gitea/gitea/assets/18380374/0c11a97f-6517-47f2-8773-f381488c084e)
* Ignore the trailing slashes when comparing oauth2 redirect_uri (#26597)wxiaoguang2023-08-212-2/+23
| | | Fix #26526
* Update tool dependencies (#26607)silverwind2023-08-203-3/+4
| | | | | | - Updated all tool dependencies to latest versions - Add Makefile to `swagger` files because it specifies `go-swagger` version - Fix lint
* bump go to 1.21 (#26608)techknowlogick2023-08-213-3/+3
| | | Co-authored-by: Giteabot <teabot@gitea.io>