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

feat: gitea upgrade 1.22.5 -> 1.23.1 #14550

Merged
merged 2 commits into from
Jan 31, 2025
Merged

Conversation

mirkoSekulic
Copy link
Collaborator

@mirkoSekulic mirkoSekulic commented Jan 30, 2025

Description

Gitea version upgrade 1.22.6 -> 1.23.1

Related Issue(s)

  • #{issue number}

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Summary by CodeRabbit

Summary by CodeRabbit

  • Upgrade

    • Updated Gitea base image from version 1.22.6 to 1.23.1
  • Localization

    • Added new configuration entry for syncing repository licenses in English and Norwegian language files
    • Enhanced Norwegian localization with additional translations for user interface elements
  • User Interface

    • Updated navbar logic for improved responsiveness to user permissions and states
    • Adjusted routing for the admin panel link and modified dropdown menu classes

Copy link
Contributor

coderabbitai bot commented Jan 30, 2025

📝 Walkthrough

Walkthrough

The pull request introduces updates to the Gitea application, focusing on a version upgrade and localization improvements. The primary changes include updating the base Docker image to version 1.23.1-rootless and enhancing localization files for English (US) and Norwegian languages. Additionally, updates to the navbar template improve user interface logic and permissions handling. These modifications aim to improve the application's version and provide more comprehensive language support, particularly for repository license synchronization features.

Changes

File Change Summary
gitea/Dockerfile Updated base image from 1.22.6-rootless to 1.23.1-rootless
gitea/files/locale/base/locale_en-US.ini Added new configuration entry dashboard.sync_repo_licenses for repository license synchronization
gitea/files/locale/base/locale_nb-NO.ini Added new localization key dashboard.sync_repo_licenses and updated various translation entries
gitea/files/custom/templates/base/head_navbar.tmpl Updated navbar logic for user permissions and application state, modified dropdown menus, and changed admin panel URL

Suggested labels

solution/platform, skip-releasenotes

Suggested reviewers

  • Ahmed-Ghanam

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7bf31bf and a11bb37.

📒 Files selected for processing (1)
  • gitea/files/custom/templates/base/head_navbar.tmpl (6 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build environment and run e2e test
  • GitHub Check: Run integration tests against actual gitea and db
🔇 Additional comments (6)
gitea/files/custom/templates/base/head_navbar.tmpl (6)

38-44: LGTM! Improved permission handling structure.

The changes properly utilize Gitea 1.23.1's new context-based permission system for issues and pull requests visibility. This is a structural improvement that makes permission handling more maintainable.


194-202: LGTM! Enhanced form handling for stopwatch actions.

The addition of the form-fetch-action class improves the user experience by handling stopwatch actions via AJAX instead of traditional form submissions.


Line range hint 1-213: Verify Gitea 1.23.1 upgrade impact on custom templates.

Since this is a custom template override, please verify that:

  1. All template changes are compatible with Gitea 1.23.1's base templates
  2. No new template variables or features from 1.23.1 are missing

161-161: Verify admin panel URL change impact.

The admin panel URL has changed to use the /-/ prefix. This change needs to be:

  1. Documented in upgrade notes if it's a breaking change
  2. Verified for any bookmarks or documentation that need updating
✅ Verification successful

Admin panel URL change is safe ✓

The URL change to /-/admin is an isolated UI improvement that only affects the navigation menu. No documentation updates or additional changes are required as:

  • No documentation references the admin panel URL
  • API endpoints remain unchanged
  • The change is contained to a single template file
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other instances of the old admin URL pattern that might need updating
rg -g '!*.git*' '/admin\b' .

Length of output: 448


Script:

#!/bin/bash
# Search for admin-related documentation and UI templates
rg -g '*.md' -g '*.rst' -g '*.txt' -g '*.tmpl' -i '\badmin\b' .

Length of output: 489


73-73: Verify user menu header styling after UI class removal.

Similar to the mobile menu changes, the removal of the "ui" class from the header div should be verified for styling consistency.

✅ Verification successful

Removal of "ui" class from header div is safe

The change is part of a broader UI framework cleanup, and the header's functionality is preserved within the dropdown menu structure. The element is a simple text container displaying "Signed in as " that doesn't require special UI framework styling.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any compensating UI class changes in the codebase
rg -g '*.{css,less,scss}' 'user-menu.*header' .

Length of output: 49


Script:

#!/bin/bash
# Get the full context of the template file
echo "=== Template Context ==="
cat gitea/files/custom/templates/base/head_navbar.tmpl

# Find similar header elements in other template files
echo -e "\n=== Similar Headers in Templates ==="
rg -g '*.tmpl' 'class=".*header"' .

# Look for any semantic UI related styles
echo -e "\n=== Semantic UI Related Styles ==="
rg -g '*.{css,less,scss}' 'ui.header' .

Length of output: 10304


14-14: Verify mobile menu styling after UI class removal.

The removal of the "ui" class from the mobile menu might affect styling. Please ensure this change is aligned with Gitea 1.23.1's UI framework updates and verify that the mobile menu still displays correctly.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the solution/studio/repos Issues related to the Altinn Studio Repos solution (Gitea). label Jan 30, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
gitea/files/locale/base/locale_nb-NO.ini (1)

2944-2944: Fix formatting inconsistencies in translation entry

The new translation entry has inconsistent formatting. Consider using quotes and consistent spacing around the equals sign to match other similar entries.

-dashboard.sync_repo_licenses = Sync repo licenses
+dashboard.sync_repo_licenses="Sync repo licenses"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04d5a34 and 7bf31bf.

📒 Files selected for processing (3)
  • gitea/Dockerfile (1 hunks)
  • gitea/files/locale/base/locale_en-US.ini (1 hunks)
  • gitea/files/locale/base/locale_nb-NO.ini (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • gitea/Dockerfile
  • gitea/files/locale/base/locale_en-US.ini
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build environment and run e2e test
  • GitHub Check: Run integration tests against actual gitea and db

@mirkoSekulic
Copy link
Collaborator Author

Tested in dev

@mirkoSekulic mirkoSekulic added the skip-manual-testing PRs that do not need to be tested manually label Jan 31, 2025
@mirkoSekulic mirkoSekulic merged commit 926dd23 into main Jan 31, 2025
16 checks passed
@mirkoSekulic mirkoSekulic deleted the feat/gitea-version-upgrade branch January 31, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-manual-testing PRs that do not need to be tested manually solution/studio/repos Issues related to the Altinn Studio Repos solution (Gitea). team/studio-core
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants