Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !4507

Merged
Created 11 years ago by Administrator@rootOwner9 of 9 tasks completed9/9 tasks

Linking objects from GFM references

  • Overview 74
  • Commits 1
  • Changes 32

Created by: smashwilson

Hello!

This is an implementation in progress of linking issues from comments, also referenced in #2676, #2714 (closed), #1170, #302 (closed), and probably others. I'm pushing it out now to get early feedback on what I've already done and to hear any thoughts about edge cases I might not be accounting for.

Any mention of issues, merge requests, or commits via GitLab-flavored markdown references in descriptions, titles or follow-on notes to any of the above attaches a system note to the referenced object containing a backtracking link. Furthermore, pushing commits that match a (configurable) regexp to a project's default branch will close any issues mentioned in the closing phrase.

Left to do:

  • Only close issues from commits pushed to the project's default branch -- meaning, actually make it do that thing I said it does 😉
  • If any Mentionable is edited, create additional cross-references for any references that weren't there to begin with.
  • Merge request and issue creation don't create cross-references correctly, only notes and edits. D'oh.
  • Accepting a merge request that brings in a commit that "fixes" an issue works fine, but if the "fixes" text is in a line other than the first, it happens without warning. Detect and add an "accepting this request will close issues X, Y, and Z" banner on the merge request page.
  • Look into using ActiveRecord::Dirty to implement Mentionable#watch_references, which would let us push reference updating into the observers where it belongs.
  • Duplicate "mentioned in commit..." notes when a commit that mentions a thing is merged into a new branch.
  • Link an issue closed notification back to the commit that closed it, when closing from a commit. "Status changed to closed by..."
  • Catch references in the commits in the first push to a new branch.
  • Do a final rebase and squash on upstream master.
  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
Assign to
0 Reviewers
Request review from
Milestone
No milestone
None
None
Time tracking
1
Labels
GFM (Markdown)
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
participants
Reference:
Source branch: github/fork/smashwilson/linking-issues

    0 pending comments

Menu

Projects Groups Snippets
Help