Skip to content

Conversation

@yevhenii-ponomarenko
Copy link
Contributor

@yevhenii-ponomarenko yevhenii-ponomarenko commented Nov 2, 2022

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
Copy link
Owner

kt3k commented Nov 2, 2022

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
Copy link
Owner

kt3k commented Nov 2, 2022

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
Copy link
Contributor Author

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.

Copy link
Owner

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

Thanks for the explanation. Your usage makes sense to me. Ok. Let's try this change!

LGTM

@kt3k kt3k merged commit e358289 into kt3k:master Nov 3, 2022
@yevhenii-ponomarenko yevhenii-ponomarenko deleted the pr-event-support branch November 3, 2022 12:51
@kt3k kt3k mentioned this pull request Nov 5, 2022
kt3k added a commit that referenced this pull request Nov 5, 2022
kt3k added a commit that referenced this pull request Nov 5, 2022
@Loki-Afro Loki-Afro mentioned this pull request Mar 22, 2023
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.

2 participants