[go: up one dir, main page]

Skip to content

Create System Note for imported resource events - BitBucket Coud

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Resource events should be labeled as imported as per [the UI Design]

I've done some testing locally with BB Cloude. The only thing we import that this fix would apply to is MR merge events.

However these are not being shown as imported with the fix for DT that has fixed other importers:

Screenshot_2024-08-06_at_15.36.34

Unlike the other importers, the merge event isn't part of the disscussions.json, which is where the MR comments/activity is shown (see this comment on the similar BB Server Issue)

GET /root/bb-cloud-import/[PROJECT PATH]/merge_requests/3/cached_widget.json HTTP/1.1

Sample truncated cached_widget.json response
{
  "id": 1734,
  "iid": 3,
  "description": "*Created by: erudinsky-gitlab*\n\nmy superchange",
  "title": "change1 created online with Bitbucket",
  "state": "merged",
  "merged_commit_sha": "bc92def999e65012cca45e9b5133606deb28ea94",
  "short_merged_commit_sha": "bc92def9",
  "merge_user_id": null,
  "source_branch": "erudinsky/some-feature",
  "source_project_id": 51,
  "target_branch": "main",
  "target_branch_sha": "866d69e674eec996eed20491f96679725555e639",
  "target_project_id": 51,
  "squash": false,
  "rebase_in_progress": false,
  "default_squash_commit_message": "change1 created online with Bitbucket",
  "merge_ongoing": false,
  "remove_source_branch": null,
  "source_branch_exists": true,
  "merge_status": "can_be_merged",
  "commits_without_merge_commits": [
    {
      "message": "change1 created online with Bitbucket",
      "short_id": "bc92def9",
      "title": "change1 created online with Bitbucket"
    }
  ],
  "diff_head_sha": "bc92def999e65012cca45e9b5133606deb28ea94",
  "metrics": {
    "closed_at": null,
    "merged_at": null,
    "closed_by": null,
    "merged_by": {
      "id": 1,
      "username": "root",
      "name": "Administrator",
      "state": "active",
      "locked": false,
      "avatar_url": "https://www.gravatar.com/avatar/232629b044261dc88102052d04fc940a16e8ea38cb508fa8c01ec8c4d8a8f457?s=80&d=identicon",
      "web_url": "http://gdk.test:3000/root",
      "show_status": false,
      "path": "/root"
    }
  },
  "diverged_commits_count": 0,
  "merge_pipeline": null,
  "target_branch_commits_path": "/bitbucket-cloud-import/frogger/-/commits/main",
  "merge_request_widget_path": "/bitbucket-cloud-import/frogger/-/merge_requests/3/widget.json",
  "target_branch_tree_path": "/bitbucket-cloud-import/frogger/-/tree/main",
  "merged_commit_path": "/bitbucket-cloud-import/frogger/-/commit/bc92def999e65012cca45e9b5133606deb28ea94",
  "source_branch_path": "/bitbucket-cloud-import/frogger/-/branches/erudinsky%2Fsome-feature",
  "source_branch_with_namespace_link": "<a href=\"/bitbucket-cloud-import/frogger/-/tree/erudinsky/some-feature\">erudinsky/some-feature</a>",
  "diffs_path": "/bitbucket-cloud-import/frogger/-/merge_requests/3/diffs",
  "squash_enabled_by_default": false,
  "squash_readonly": false,
  "squash_on_merge": false,
  "api_approvals_path": "/api/v4/projects/51/merge_requests/3/approvals",
  "api_approve_path": "/api/v4/projects/51/merge_requests/3/approve",
  "api_unapprove_path": "/api/v4/projects/51/merge_requests/3/unapprove",
  "test_reports_path": null,
  "accessibility_report_path": null,
  "codequality_reports_path": null,
  "terraform_reports_path": null,
  "exposed_artifacts_path": null,
  "blob_path": {
    "head_path": "/bitbucket-cloud-import/frogger/-/blob/bc92def999e65012cca45e9b5133606deb28ea94",
    "base_path": "/bitbucket-cloud-import/frogger/-/blob/244eba9ad20da6c1c6171bbcbc7867ea0b013ab1"
  },
  "favicon_overlay_path": "/assets/mr_favicons/favicon_status_merged-827107b1ea19e71145d64e9302e9a7e123552af6161b6126d7e10f512af52b98.png",
  "policy_violation": false,
  "api_status_checks_path": null
}
Edited by 🤖 GitLab Bot 🤖