Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle pr:deleted from Bitbucket Server aka Stash #498

Closed
miked0004 opened this issue Feb 27, 2019 · 0 comments
Closed

Handle pr:deleted from Bitbucket Server aka Stash #498

miked0004 opened this issue Feb 27, 2019 · 0 comments
Labels
feature New functionality/enhancement provider/bitbucket

Comments

@miked0004
Copy link

Problem

When a PR is deleted (not declined) in Bitbucket Server, it sends a pr-deleted event. Atlantis discards this event and keeps the lock. I believe this can be handled like pr-declined.

Details

Version: Bitbucket Server v5.11.1

pr-deleted payload

{
  "eventKey": "pr:deleted",
  "date": "2017-09-19T11:16:17+1000",
  "actor": {
    "name": "admin",
    "emailAddress": "[email protected]",
    "id": 1,
    "displayName": "Administrator",
    "active": true,
    "slug": "admin",
    "type": "NORMAL"
  },
  "pullRequest": {
    "id": 10,
    "version": 3,
    "title": "Commit message",
    "state": "OPEN",
    "open": true,
    "closed": false,
    "createdDate": 1505783668760,
    "updatedDate": 1505783750704,
    "fromRef": {
      "id": "refs/heads/decline-me",
      "displayId": "decline-me",
      "latestCommit": "2d9fb6b9a46eafb1dcef7b008d1a429d45ca742c",
      "repository": {
        "slug": "repository",
        "id": 84,
        "name": "repository",
        "scmId": "git",
        "state": "AVAILABLE",
        "statusMessage": "Available",
        "forkable": true,
        "project": {
          "key": "PROJ",
          "id": 84,
          "name": "project",
          "public": false,
          "type": "NORMAL"
        },
        "public": false
      }
    },
    "toRef": {
      "id": "refs/heads/master",
      "displayId": "master",
      "latestCommit": "7e48f426f0a6e47c5b5e862c31be6ca965f82c9c",
      "repository": {
        "slug": "repository",
        "id": 84,
        "name": "repository",
        "scmId": "git",
        "state": "AVAILABLE",
        "statusMessage": "Available",
        "forkable": true,
        "project": {
          "key": "PROJ",
          "id": 84,
          "name": "project",
          "public": false,
          "type": "NORMAL"
        },
        "public": false
      }
    },
    "locked": false,
    "author": {
      "user": {
        "name": "admin",
        "emailAddress": "[email protected]",
        "id": 1,
        "displayName": "Administrator",
        "active": true,
        "slug": "admin",
        "type": "NORMAL"
      },
      "role": "AUTHOR",
      "approved": false,
      "status": "UNAPPROVED"
    },
    "reviewers": [
      {
        "user": {
          "name": "user",
          "emailAddress": "[email protected]",
          "id": 2,
          "displayName": "User",
          "active": true,
          "slug": "user",
          "type": "NORMAL"
        },
        "role": "REVIEWER",
        "approved": false,
        "status": "UNAPPROVED"
      }
    ],
    "participants": []
  }
}
lkysow added a commit that referenced this issue Mar 1, 2019
If a pull request is deleted, Atlantis should delete the locks.
Fixes #498
@lkysow lkysow added the feature New functionality/enhancement label Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement provider/bitbucket
Projects
None yet
Development

No branches or pull requests

3 participants