mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-26 15:31:53 +00:00
1e7dd2043c
* fix(github): set commit message explicitly for platform automerge When GitHub's "Use PR title and body as commit message" setting is enabled, the verbose Renovate PR description gets used as the squash commit body. Pass `commitHeadline` and `commitBody` to the `enablePullRequestAutoMerge` GraphQL mutation so the actual commit message is used instead. * add REBASE test * pr feedback
92 lines
1.6 KiB
TypeScript
92 lines
1.6 KiB
TypeScript
export const repoInfoQuery = `
|
|
query($owner: String!, $name: String!, $user: String) {
|
|
repository(owner: $owner, name: $name) {
|
|
id
|
|
isFork
|
|
parent {
|
|
nameWithOwner
|
|
}
|
|
isArchived
|
|
nameWithOwner
|
|
hasIssuesEnabled
|
|
hasVulnerabilityAlertsEnabled
|
|
autoMergeAllowed
|
|
mergeCommitAllowed
|
|
rebaseMergeAllowed
|
|
squashMergeAllowed
|
|
defaultBranchRef {
|
|
name
|
|
target {
|
|
oid
|
|
}
|
|
}
|
|
issues(
|
|
orderBy: { field: UPDATED_AT, direction: DESC },
|
|
filterBy: { createdBy: $user },
|
|
first: 5
|
|
) {
|
|
nodes {
|
|
number
|
|
state
|
|
title
|
|
body
|
|
updatedAt
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getIssuesQuery = `
|
|
query(
|
|
$owner: String!,
|
|
$name: String!,
|
|
$user: String,
|
|
$count: Int,
|
|
$cursor: String
|
|
) {
|
|
repository(owner: $owner, name: $name) {
|
|
issues(
|
|
orderBy: { field: UPDATED_AT, direction: DESC },
|
|
filterBy: { createdBy: $user },
|
|
first: $count,
|
|
after: $cursor
|
|
) {
|
|
pageInfo {
|
|
endCursor
|
|
hasNextPage
|
|
}
|
|
nodes {
|
|
number
|
|
state
|
|
title
|
|
body
|
|
updatedAt
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const enableAutoMergeMutation = `
|
|
mutation EnablePullRequestAutoMerge(
|
|
$pullRequestId: ID!,
|
|
$mergeMethod: PullRequestMergeMethod!,
|
|
$commitHeadline: String,
|
|
$commitBody: String,
|
|
) {
|
|
enablePullRequestAutoMerge(
|
|
input: {
|
|
pullRequestId: $pullRequestId,
|
|
mergeMethod: $mergeMethod,
|
|
commitHeadline: $commitHeadline,
|
|
commitBody: $commitBody,
|
|
}
|
|
) {
|
|
pullRequest {
|
|
number
|
|
}
|
|
}
|
|
}
|
|
`;
|