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

Don't forward merge ref if it's not up to date #125

Merged
merged 2 commits into from
Feb 13, 2023

Conversation

ofalvai
Copy link
Contributor

@ofalvai ofalvai commented Feb 10, 2023

New Pull Request Checklist

  • Run go fmt on your files (e.g. go fmt ./service/common.go, or on the whole service folder: go fmt ./service/...)
  • Write tests for your code
    • The tests should cover both "success" and "error" cases.
    • The tests should also check all the returned variables, don't ignore any returned value!
    • Ideally the tests should be easily readable, we usually use tests to document our code instead of code comments.
      An example, if you'd write a comment like "Given X this function will return Y" or
      "Beware, if the input is X this function will return Y" then you should implement this as
      a unit test, instead of writing it as a comment.
  • If your Pull Request is more than a bug fix you should also check README.md and change/add the descriptions there - also
    feel free to add yourself as a contributor if you implement support for a new service ;)
  • Before creating the Pull Request you should also run bitrise run test with the Bitrise CLI,
    to perform all the automatic checks (which will run on your Pull Request when you open it).

Summary of Pull Request

The mergeable field can be true, false or null. When it's null, this means the mergeability check is still pending, so using the merge ref in checkouts leads to checking out an outdated state.

This PR changes how we create the build params, we should only include the merge ref if we know it's up to date.

GitHub API: https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#get-a-pull-request

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.

2 participants