app
app copied to clipboard
Add support for new GitHub feature
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
- Pull Requests
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.
Probably, it works but it is not documented? -> https://github.com/google/go-github/pull/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)
+1 for this feature. does it still lack REST API?
The parameter is called use_squash_pr_title_as_default as per GitHub's OpenAPI spec
Either
trueto allow squash-merge commits to use pull request title, orfalseto use commit message.
The parameter is called
use_squash_pr_title_as_defaultas per GitHub's OpenAPI specEither
trueto allow squash-merge commits to use pull request title, orfalseto use commit message.
👌. Released in the last version of octokit.js_v1.8.0
@gr2m I am referring to "Always suggest updating pull request branches" feature. I believe what you are talking about is something different.
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
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 ?

Other links:
- https://github.com/octokit/types.ts/blob/master/scripts/update-endpoints/generated/endpoints.json#L12868
- https://github.com/octokit/openapi/blob/0e636a10f9872a0ee0d633039e21ecef6b0caef2/generated/ghes-3.3-diff-to-ghes-3.4.json#L5432
GitHub
Shared TypeScript definitions for Octokit projects - types.ts/endpoints.json at master · octokit/types.ts
GitHub
openapi/ghes-3.3-diff-to-ghes-3.4.json at 0e636a10f9872a0ee0d633039e21ecef6b0caef2 · octokit/openapiGitHub's official OpenAPI spec with Octokit extensions - openapi/ghes-3.3-diff-to-ghes-3.4.json at 0e636a10f9872a0ee0d633039e21ecef6b0caef2 · octokit/openapi
@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?
@dgokcin if it has a rest api for the repos, then it is already supported by probot settings.
@foolioo thanks. I can confirm that it is working with allow_update_branch: true under repository settings.
@foolioo thanks. I can confirm that it is working with
allow_update_branch: trueunder repository settings.
Should documentation be updated?
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
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.
deserves a mention of this in a more visible place, rather than a commented-out link
https://github.com/repository-settings/app/pull/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
but would entertain PRs to further improve the clarity of configuration docs
@travi https://github.com/repository-settings/app/pull/480