Skip to content
Snippets Groups Projects

No space required after WIP identifier

Merged username-removed-236938 requested to merge TheTedHogan/gitlab-ce:wipMergeSpacing into master

Fixes #2426 (closed)

Currently, the WIP: (or any other variation) prefix of a merge request title must include a trailing space for it to be recognized as a work in progress and prevent merging. To resolve this, I added an or pattern to the regexp to look for any one of the three possible delimiters ':', ']', or ' '. This way the trailing space isn't required but it still won't mark any titles beginning with wip as work in progress (e.g. "Wipwap").

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
239 239 end
240 240
241 241 def work_in_progress?
242 !!(title =~ /\A\[?WIP\]?:? /i)
242 !!(title =~ /\A\[?WIP(\]|:| )/i)
  • Added 1328 commits:

    • 6e6a9906...eeba266e - 1327 commits from branch gitlab-org:master
    • 9fc6df51 - Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into wipMergeSpacing
  • This has two commits now, but one is just fixing merge conflicts.

  • @TheTedHogan Can you retry again with CI?

  • @DouweM Looks good to me. Any issues with this?

  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 193 193 expect(subject).to be_work_in_progress
    194 194 end
    195 195
    196 it "detects the 'WIP' prefix" do
    197 subject.title = "WIP#{subject.title}"
    198 expect(subject).to be_work_in_progress
  • Added 1 commit:

    • f0c2f748 - Removed redundent and incorrect tests on WIP
  • Douwe Maan Enabled an automatic merge when the build for TheTedHogan/gitlab-ce@f0c2f7481febf1e1149cb3dba87780c462759d14 succeeds

    Enabled an automatic merge when the build for TheTedHogan/gitlab-ce@f0c2f7481febf1e1149cb3dba87780c462759d14 succeeds

  • I can't figure out why the builds are failing. It looks like they fail setting up the environment, but I'm not sure what to do to make it pass. Any ideas?

  • Douwe Maan Canceled the automatic merge

    Canceled the automatic merge

  • Douwe Maan Status changed to merged

    Status changed to merged

  • Douwe Maan mentioned in commit a1fa9731

    mentioned in commit a1fa9731

  • @TheTedHogan I ran the test locally and it passed. Not sure why it's failing here, but I'll go ahead and merge.

  • @TheTedHogan Thanks for contributing this :)

  • Please register or sign in to reply
    Loading