1. 12 Apr, 2016 3 commits
    • Timothy Andrew's avatar
      Augment the tests for `Issue#related_branches` · 91034af3
      Timothy Andrew authored
      - Test the case where we have a referenced merge request that's being
      - excluded as a "related branch"
      - This took a while to figure out, especially the
        `create_cross_references!` line.
      91034af3
    • Timothy Andrew's avatar
      Refactor `Issue#related_branches` · 5d88de09
      Timothy Andrew authored
      - Previously, the controller held the logic to calculate
        related branches, which was:
      
        `<branches ending with `issue.iid`> - <branches with a merge request referenced in the current issue>`
      
      - This logic belongs in the `related_branches` method, not in the
        controller. This commit makes this change.
      
      - This means that `Issue#related_branches` now needs to take a `User`.
        When we find the branches that have a merge request referenced in the
        current issue, this is limited to merge requests that the current user
        has access to.
      
      - This is not directly related to #14566, but is a related refactoring.
      5d88de09
    • Timothy Andrew's avatar
      Sanitize branch names for confidential issues. · 377b59da
      Timothy Andrew authored
      - When creating new branches for confidential issues,
        prefer a branch name like `issue-15` to
        `some-sensitive-issue-title-15`.
      - The behaviour for non-confidential issues stays the same.
      377b59da
  2. 11 Apr, 2016 35 commits
  3. 10 Apr, 2016 2 commits