[Launchpad-reviewers] [Merge] lp:~cjwatson/launchpad/github-bugtracker-uppercase-in-names into lp:launchpad

2016-07-25 Thread noreply
The proposal to merge 
lp:~cjwatson/launchpad/github-bugtracker-uppercase-in-names into lp:launchpad 
has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/github-bugtracker-uppercase-in-names/+merge/301053
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~cjwatson/launchpad/github-bugtracker-uppercase-in-names into lp:launchpad.

___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] lp:~cjwatson/launchpad/github-bugtracker-uppercase-in-names into lp:launchpad

2016-07-25 Thread Maximiliano Bertacchini
Review: Approve

Looks good!
-- 
https://code.launchpad.net/~cjwatson/launchpad/github-bugtracker-uppercase-in-names/+merge/301053
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~cjwatson/launchpad/github-bugtracker-uppercase-in-names into lp:launchpad.

___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


[Launchpad-reviewers] [Merge] lp:~cjwatson/launchpad/github-bugtracker-uppercase-in-names into lp:launchpad

2016-07-25 Thread Colin Watson
Colin Watson has proposed merging 
lp:~cjwatson/launchpad/github-bugtracker-uppercase-in-names into lp:launchpad.

Commit message:
Convert GitHub repository IDs to lower-case when making bugtracker names for 
them.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1606197 in Launchpad itself: "GitHub bug tracker skipping capital 
letters"
  https://bugs.launchpad.net/launchpad/+bug/1606197

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/github-bugtracker-uppercase-in-names/+merge/301053

Convert GitHub repository IDs to lower-case when making bugtracker names for 
them.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~cjwatson/launchpad/github-bugtracker-uppercase-in-names into lp:launchpad.
=== modified file 'lib/lp/bugs/model/bugtracker.py'
--- lib/lp/bugs/model/bugtracker.py	2016-07-13 15:01:07 +
+++ lib/lp/bugs/model/bugtracker.py	2016-07-25 11:46:39 +
@@ -149,9 +149,8 @@
 raise AssertionError(
 'Not a valid email address: %s' % base_uri.path)
 elif base_uri.host == 'github.com' and base_uri.path.endswith('/issues'):
-base_name = (
-'github-' +
-base_uri.path[:-len('/issues')].lstrip('/').replace('/', '-'))
+repository_id = base_uri.path[:-len('/issues')].lstrip('/')
+base_name = 'github-' + repository_id.replace('/', '-').lower()
 else:
 base_name = base_uri.host
 

=== modified file 'lib/lp/bugs/tests/test_bugtracker.py'
--- lib/lp/bugs/tests/test_bugtracker.py	2016-07-13 15:01:07 +
+++ lib/lp/bugs/tests/test_bugtracker.py	2016-07-25 11:46:39 +
@@ -414,6 +414,9 @@
 self.assertEqual(
 'auto-github-user-repository',
 make_bugtracker_name('https://github.com/user/repository/issues'))
+self.assertEqual(
+'auto-github-user-repository',
+make_bugtracker_name('https://github.com/user/Repository/issues'))
 # Invalid on the GitHub side, but let's make sure these don't blow up.
 self.assertEqual(
 'auto-github-user',

___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp