Skip to content

feat: add PR original title to copy.bara.sky.ts #131

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

luong-komorebi
Copy link

@luong-komorebi luong-komorebi commented Feb 18, 2025

Motivation and context

When this is not configured, copybara takes the last commit message and applies it as PR title for the source repo.

Further implementation can be seen from here: https://github.com/google/copybara/blob/9230fff6b1cfd63ecfafbcec9d58fd8cdfa03688/java/com/google/copybara/git/GitHubPrDestination.java#L247-L251
(If GitHubPrDestination.this.title is not defined, the default value for the title is the first line of the ChangeMessage parsed from the summary of the TransformResult)

Solution

I believe the following is a sane default, but let me know if I should configure this on my own instead of open a pull request

  • Explicitly define the GITHUB_PR_TITLE and carry it over to the original PR.

How has this been tested

  • On my own private repository
  • On the CI by changing expectation of end to end test

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the docs/CONTRIBUTING.md document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@@ -30,7 +30,7 @@ jobs:
env:
COMMIT_MESSAGE: ${{ steps.commit.outputs.COMMIT_MESSAGE }}
with:
commit-message: "[Test PR] ${{env.COMMIT_MESSAGE}}"
commit-message: "${{env.COMMIT_MESSAGE}}"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be different rfom PR title otherwise it is mistakenly understood as source PR title is taken from ... dest PR title while it s taken from commit message instead

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

Successfully merging this pull request may close these issues.

1 participant