kt3k / update-pr-description

Update Pull Request Description on Push
Apache License 2.0
21 stars 14 forks source link

Add support for `pull_request` events #13

Closed yevhenii-ponomarenko closed 1 year ago

yevhenii-ponomarenko commented 1 year ago

While trying to use this action, I found out that it doesn't support pull_request events fired by GitHub. This PR attempts to add support for those while keeping compatibility with push events.

Consequently, this PR solves #4.

kt3k commented 1 year ago

I don't understand the usage well.

Is the below scenario what this PR tries to support?

  1. Someone creates a pull request with some description.
  2. This action updates the description of that PR with pr_body value
kt3k commented 1 year ago

If the above is what happens with this change, then this action overwrites the description which the PR author has written manually. I don't understand why such thing is desired.

yevhenii-ponomarenko commented 1 year ago

My specific use case is that I want to create a Jira ticket for some PRs and add the number of that ticket to the PR title. There is a way to get current PR title and description from GitHub variables, so my "Test PR" becomes "[PJ-1235] Test PR", for example.

I really needed this action to work with on: pull_request: [opened] event, so this patch made just that. I tested that on my side and it works, though on: push events still need to be tested as well.