Skip to content

Commit

Permalink
fix: use full name for head branch to allow for repo renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Apr 8, 2022
1 parent f1a7646 commit d9fad3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions dist/index.js
Expand Up @@ -996,8 +996,7 @@ class GitHubHelper {
}
createOrUpdatePullRequest(inputs, baseRepository, headRepository) {
return __awaiter(this, void 0, void 0, function* () {
const [headOwner] = headRepository.split('/');
const headBranch = `${headOwner}:${inputs.branch}`;
const headBranch = `${headRepository}:${inputs.branch}`;
// Create or update the pull request
const pull = yield this.createOrUpdate(inputs, baseRepository, headBranch);
// Apply milestone
Expand Down
3 changes: 1 addition & 2 deletions src/github-helper.ts
Expand Up @@ -113,8 +113,7 @@ export class GitHubHelper {
baseRepository: string,
headRepository: string
): Promise<Pull> {
const [headOwner] = headRepository.split('/')
const headBranch = `${headOwner}:${inputs.branch}`
const headBranch = `${headRepository}:${inputs.branch}`

// Create or update the pull request
const pull = await this.createOrUpdate(inputs, baseRepository, headBranch)
Expand Down

0 comments on commit d9fad3b

Please sign in to comment.