[obs-commits] [openSUSE/open-build-service] 6e82a0: [api] Make 'AlterIssueTracker' migration not depen...
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: 6e82a0f70d878802cfd60dac6f92ca789399e1e3 https://github.com/openSUSE/open-build-service/commit/6e82a0f70d878802cfd60d... Author: Sascha Peilicke <saschpe@suse.de> Date: 2011-11-18 (Fri, 18 Nov 2011) Changed paths: M src/api/db/migrate/20111116100002_alter_issue_trackers.rb Log Message: ----------- [api] Make 'AlterIssueTracker' migration not depend on 'rake db:seed' Better to do it inside the migration. Commit: f7315217c816a8938d46a348130364ea54aaf2be https://github.com/openSUSE/open-build-service/commit/f7315217c816a8938d46a3... Author: Sascha Peilicke <saschpe@suse.de> Date: 2011-11-18 (Fri, 18 Nov 2011) Changed paths: M src/api/app/controllers/issue_trackers_controller.rb M src/api/app/models/issue_tracker.rb M src/api/db/development_structure.sql A src/api/db/migrate/20111117162400_enhance_issue_tracker_regexen.rb M src/api/db/seeds.rb M src/api/test/functional/issue_trackers_controller_test.rb Log Message: ----------- [api] IssueTracker regexen have to tell which part is important for the upstream URL. For instance, if 'bnc#123456' is matched, only '123456' should be part of the upstream URL 'https://bugzilla.novell.com/show_bug.cgi?id=123456'. Therefore regexen may have a capture group to only return the number once matched. The code for IssueTracker#show_url_for then takes the last capture group to generate the upstream URL. It can't take just any because '(Kernel|K|bko)#(\d+)' has 2 capture groups and Ruby-1.8.x doesn't support back-references (to return only the latter). The CVE regex 'CVE-\d{4,4}-\d{4,4}' doesn't need a capture group as the generate upstream URL should be 'http://www.cvedetails.com/cve/CVE-2011-1000'. Compare: https://github.com/openSUSE/open-build-service/compare/24851aa...f731521 -- To unsubscribe, e-mail: obs-commits+unsubscribe@opensuse.org To contact the owner, e-mail: obs-commits+owner@opensuse.org
participants (1)
-
noreply@github.com