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

Add support for new GitHub feature #567

Closed
1 task
zer0Kerbal opened this issue Mar 31, 2022 · 16 comments
Closed
1 task

Add support for new GitHub feature #567

zer0Kerbal opened this issue Mar 31, 2022 · 16 comments

Comments

@zer0Kerbal
Copy link

suggest updating pull request branches is a recent addition. I skimmed probot's documentation, PR's and issues and didn't find it reference.

thank you!

located under

  • Settings
    • Pull Requests
      • Control how and when users are prompted to update their branches if there are new changes available in the base branch.
      • Whenever there are new changes available in the base branch, present an “update branch” option in the pull request.
        • Always suggest updating pull request branches
@electriquo
Copy link

keep your pull request branch up-to-date (aka Managing suggestions to update pull request branches) lacks of REST API which is utilized by ProBot Settings.

@svg153
Copy link

svg153 commented May 19, 2022

Probably, it works but it is not documented? -> google/go-github#2313

I tested using github-cli in one of my repos, and it is working (same for allow_auto_merge):

OR="myORG/myREPO"
gh api \
  --method PATCH \
  -H "Accept: application/vnd.github.v3+json" \
  /repos/"${OR}" \
  -F allow_update_branch=true

Except:

Default to PR title for squash merge commits
This will pre-populate the commit message with the PR title when performing a squash merge.

I see how the web UI works, and it is using the same URL (https://github.com/ORG/repos/settings/update_merge_settings) adding a new element squash_pr_title but I do not know the GitHub API id (I tested with squash_pr_title and allow_squash_pr_title, but do not work)

@dgokcin
Copy link

dgokcin commented Jun 22, 2022

+1 for this feature. does it still lack REST API?

@gr2m
Copy link
Member

gr2m commented Jun 22, 2022

The parameter is called use_squash_pr_title_as_default as per GitHub's OpenAPI spec

Either true to allow squash-merge commits to use pull request title, or false to use commit message.

@svg153
Copy link

svg153 commented Jun 22, 2022

The parameter is called use_squash_pr_title_as_default as per GitHub's OpenAPI spec

Either true to allow squash-merge commits to use pull request title, or false to use commit message.

👌. Released in the last version of octokit.js_v1.8.0

@dgokcin
Copy link

dgokcin commented Jun 22, 2022

@gr2m I am referring to "Always suggest updating pull request branches" feature. I believe what you are talking about is something different.

@gr2m
Copy link
Member

gr2m commented Jun 22, 2022

I'm not seeing a REST API parameter for that feature yet, sorry. I didn't check the GraphQL schema though, sometimes it has features that the REST API does not, and vice versa

@svg153
Copy link

svg153 commented Jun 22, 2022

I'm not seeing a REST API parameter for that feature yet, sorry. I didn't check the GraphQL schema though, sometimes it has features that the REST API does not, and vice versa

Have you seen this rest/repos/repos#update-a-repository ?

image

Other links:

GitHub
Shared TypeScript definitions for Octokit projects - types.ts/endpoints.json at master · octokit/types.ts
GitHub
GitHub's official OpenAPI spec with Octokit extensions - openapi/ghes-3.3-diff-to-ghes-3.4.json at 0e636a10f9872a0ee0d633039e21ecef6b0caef2 · octokit/openapi

@dgokcin
Copy link

dgokcin commented Jun 22, 2022

@svg153 does this mean that it is doable with the current version of the probot settings or there is a development effort for this functionality to work?

@electriquo
Copy link

@dgokcin if it has a rest api for the repos, then it is already supported by probot settings.

@dgokcin
Copy link

dgokcin commented Jun 22, 2022

@foolioo thanks. I can confirm that it is working with allow_update_branch: true under repository settings.

@taliastocks
Copy link

@foolioo thanks. I can confirm that it is working with allow_update_branch: true under repository settings.

Should documentation be updated?

@travi
Copy link
Member

travi commented Mar 20, 2024

Should documentation be updated?

from the configuration example:

repository:

See https://docs.github.com/en/rest/reference/repos#update-a-repository for all available settings.

please feel free to suggest changes to make the idea more obvious, but all repo properties are supported in the settings file. it isnt realistic for us to keep them all listed in the example when the api docs already provide details

@dgokcin
Copy link

dgokcin commented Mar 21, 2024

Should documentation be updated?

from the configuration example:

repository:

See https://docs.github.com/en/rest/reference/repos#update-a-repository for all available settings.

please feel free to suggest changes to make the idea more obvious, but all repo properties are supported in the settings file. it isnt realistic for us to keep them all listed in the example when the api docs already provide details

@travi I agree that continuously updating the documentation about the features in the GitHub API is not a good idea, but I don't think many users of this action know that if a property is available in the GitHub API, it is supported by the Settings Bot. As a loyal user of this app for a few years now, I believe the main README deserves a mention of this in a more visible place, rather than a commented-out link.

@travi
Copy link
Member

travi commented Mar 24, 2024

deserves a mention of this in a more visible place, rather than a commented-out link

#893 pulls the reference to a more prominent location. closing this thread as a result of that change, but would entertain PRs to further improve the clarity of configuration docs

@travi travi closed this as completed Mar 24, 2024
@electriquo
Copy link

but would entertain PRs to further improve the clarity of configuration docs

@travi #480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants