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

feat: add auto merge information to pull request #1247

Merged
merged 5 commits into from
Oct 5, 2021

Conversation

jeskosda
Copy link
Contributor

@jeskosda jeskosda commented Sep 30, 2021

Description

Hey ✋🏻 , as already clarified in #1245, this PR will add the auto merge object to the GHPullRequest.

Closes #1245

auto_merge:
      title: Auto merge
      description: The status of auto merging a pull request.
      type: object
      properties:
        enabled_by:
          "$ref": "#/components/schemas/simple-user"
        merge_method:
          type: string
          description: The merge method to use.
          enum:
            - merge
            - squash
            - rebase
        commit_title:
          type: string
          description: Title for the merge commit message.
        commit_message:
          type: string
          description: Commit message for the merge commit.
      required:
        - enabled_by
        - merge_method
        - commit_title
        - commit_message
      nullable: true

The structure is double-checked against a request against the /pulls API:

{
...,
"auto_merge": {
    "enabled_by": {
      "login": "jeskosda",
      "id": 1,
      "node_id": "xxx",
      "avatar_url": "https://avatars.githubusercontent.com/u/61695677?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/jeskosda",
      "html_url": "https://github.com/jeskosda",
      "followers_url": "https://api.github.com/users/jeskosda/followers",
      "following_url": "https://api.github.com/users/jeskosda/following{/other_user}",
      "gists_url": "https://api.github.com/users/jeskosda/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/jeskosda/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/jeskosda/subscriptions",
      "organizations_url": "https://api.github.com/users/jeskosda/orgs",
      "repos_url": "https://api.github.com/users/jeskosda/repos",
      "events_url": "https://api.github.com/users/jeskosda/events{/privacy}",
      "received_events_url": "https://api.github.com/users/jeskosda/received_events",
      "type": "User",
      "site_admin": false
    },
    "merge_method": "squash",
    "commit_title": "Test",
    "commit_message": "Test"
  }
}

@jeskosda jeskosda force-pushed the feat/add_automerge_state branch from 276c132 to 4c493e7 Compare September 30, 2021 08:43
@jeskosda jeskosda marked this pull request as ready for review October 1, 2021 12:33
@codecov
Copy link

codecov bot commented Oct 4, 2021

Codecov Report

Merging #1247 (1b5de5b) into main (b92c060) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1247      +/-   ##
============================================
+ Coverage     77.42%   77.47%   +0.04%     
- Complexity     1899     1901       +2     
============================================
  Files           189      189              
  Lines          5972     5985      +13     
  Branches        327      327              
============================================
+ Hits           4624     4637      +13     
  Misses         1150     1150              
  Partials        198      198              
Impacted Files Coverage Δ
...rc/main/java/org/kohsuke/github/GHPullRequest.java 77.86% <100.00%> (+1.06%) ⬆️
src/main/java/org/kohsuke/github/GHRepository.java 68.42% <0.00%> (+0.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b92c060...1b5de5b. Read the comment docs.

@bitwiseman bitwiseman merged commit 0567b4e into hub4j:main Oct 5, 2021
@jeskosda jeskosda deleted the feat/add_automerge_state branch October 5, 2021 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide Auto Merge information in pull request?
2 participants