harshthakur3 opened a new pull request, #76949: URL: https://github.com/apache/airflow/pull/76949
closes: #76948 `GitDagBundle.view_url_template()` converts an SSH `repo_url` such as `[email protected]:org/repo.git` into the https URL Airflow links to for a Dag's source: the Code tab, the Dag version details and the Dag bundles page in the UI, and `bundle_url` in the REST API. The conversion removed `.git` with `str.replace`, which drops it anywhere in the repository path instead of only as the suffix, so a repository whose name contains `.git` got a link to a repository that does not exist: | `repo_url` | Link before | Link after | | --- | --- | --- | | `[email protected]:apache/airflow.github.io.git` | `https://github.com/apache/airflowhub.io/tree/{version}` | `https://github.com/apache/airflow.github.io/tree/{version}` | It now strips only a trailing `.git`, the way `view_url_template()` already treats HTTPS URLs. SSH URLs whose only `.git` is the suffix get the same link as before, and HTTPS URLs do not go through this conversion. Cloning is unaffected because it uses `repo_url` as given; only the link was wrong, and it has been wrong since the first git provider release. The new `test_view_url` case fails on `main` with the `airflowhub.io` link and passes with this change. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
