-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[JENKINS-54858] Enhance organization & Repository Name Extraction for Multiple URL Formats /feature/org-repo-name-extraction #1646
base: master
Are you sure you want to change the base?
Conversation
@mohdishaq786 please complete the sections in the pull request template, especially the "Testing done" section. We expect that the pull request template is completed so that the reviewers know what testing you have done and how you have confirmed that the changes are working as expected. Interactive testing is especially important for this change because I'm not confident that the existing tests will cover the changes in this pull request. |
…' into feature/org-repo-name-extraction
hi @MarkEWaite Thank you for the feedback! I actually ran an interactive test after setting up the global regex and got the expected results. I've attached a screenshot of the test outcome to demonstrate that the organization name and repository name are being extracted correctly. Please let me know if there are any other concerns or if you need further adjustments. |
I think that it is a mistake to require the user to configure something on the global configuration page before they see the desired values on the build data page. I did not visit the global configuration page and would not expect most users to visit the configuration page. I think that is a mistake to add the calculated values of the organization name and the repository to the build data. There are already cases where the contents of the build data record grows excessively. The value of the organization name and the repository can be computed at display time rather than being stored in the build data record. I think that if the organization name or the repository cannot be determined, then that field should not be displayed. Showing the user a "this field is not known" will cause them to be perplexed why the data is not known. |
I have gone through some previous comments of yours where you have praised a suggestion of setting up global regex in global config page(screenshot attached),thats why I have implemented the said. As per your suggestion where most of user will not go to global config page, in that scenario shall I add a functionality to extract org name and repo name by default regex.Also I will add if the organization name or the repository cannot be determined, then that field should not be displayed instead of "field not know". |
Yes, the out of the box default needs to detect the typical repository URLs without requiring that the user must visit the configuration page. I'll be out of the office and away from computers for about two weeks. Reviews will be delayed until then (at least). |
@MarkEWaite I’ve completed the feature to automatically detect repository URLs and extract the organization and repository names without requiring users to manually visit the configuration page. |
Display Organization/Project and Repository Names
Description
This update introduces the following enhancements:
Issue Reference
https://issues.jenkins.io/browse/JENKINS-54868
Testing done
Added tests to ensure the accuracy of the getRepoName and getOrganizationName functions, covering various
protocols and scenarios.
Verified that the extracted organization and repository names are correctly processed and available for display on the relevant pages.
mvn clean verify
to run all tests, confirming that the changes do not introduce any regressions.mvn clean -DskipTests
verify to validate the build process without running tests, ensuring that the build is successfull.3.Interactive Testing:
Manually tested the UI to verify that the organization and repository names are correctly displayed on the job detail page and the Git build data page.
Set up a global regular expression on the global configuration page to extract organization and repository names. Verified that this setup is correctly applied and functioning as expected.
Attached below is a screenshot of the UI after the changes were applied, including the setup of the global regular expression:
Submitter checklist