diff --git a/commands/issue.go b/commands/issue.go index ba46267ecd3310b3d6efc4d2a1fbf2361897d580..53945e3b9a2731ce0493660ec448aff3571a5e23 100644 --- a/commands/issue.go +++ b/commands/issue.go @@ -413,6 +413,9 @@ func formatPullRequestPlaceholders(pr github.PullRequest) map[string]string { return map[string]string{ "B": base, "H": head, + "sB": pr.Base.Sha, + "sH": pr.Head.Sha, + "sm": pr.MergeCommitSha, "rs": strings.Join(requestedReviewers, ", "), "mD": mergedDate, "mI": mergedAtISO8601, diff --git a/commands/pr.go b/commands/pr.go index 1dc3e4d74a0ae4746f507a6203075ff9711f1969..8ef8952971e563fa6d4ba42dce6d280c6504cf82 100644 --- a/commands/pr.go +++ b/commands/pr.go @@ -67,8 +67,14 @@ pr checkout [] %B: base branch + %sB: base commit SHA + %H: head branch + %sH: head commit SHA + + %sm: merge commit SHA + %au: login name of author %as: comma-separated list of assignees diff --git a/github/client.go b/github/client.go index 7e57c43ea9de02b84656b4dec2e01031bd4940db..c27969673498bdbc270ecad0ce8c2bc96f1738c0 100644 --- a/github/client.go +++ b/github/client.go @@ -542,7 +542,8 @@ type Issue struct { Head *PullRequestSpec `json:"head"` Base *PullRequestSpec `json:"base"` - MaintainerCanModify bool `json:"maintainer_can_modify"` + MergeCommitSha string `json:"merge_commit_sha"` + MaintainerCanModify bool `json:"maintainer_can_modify"` Comments int `json:"comments"` Labels []IssueLabel `json:"labels"`