Skip to content
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

Extract PR number from event instead of using RefName #145

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

markusthoemmes
Copy link
Contributor

On normal pull-request events, the RefName attribute is usually $prNumber/merge. However, when merging a pull-request, it becomes the name of the branch the PR is merged into. This beraks the connection between creating and deleting preview apps.

This changes the method of figuring out the underlying pull-request by looking at the event payload directly and parsing the respective number out of there.

@markusthoemmes markusthoemmes force-pushed the better-pr-number-extraction branch from 934164b to 1ed88ab Compare September 24, 2024 07:00
On normal pull-request events, the `RefName` attribute is usually `$prNumber/merge`. However, when **merging** a pull-request, it becomes the name of the branch the PR is merged into. This beraks the connection between creating and deleting preview apps.

This changes the method of figuring out the underlying pull-request by looking at the event payload directly and parsing the respective number out of there.
@markusthoemmes markusthoemmes force-pushed the better-pr-number-extraction branch from 1ed88ab to bd8fefb Compare September 24, 2024 07:04
@markusthoemmes markusthoemmes added the bug Something isn't working label Sep 24, 2024
@markusthoemmes markusthoemmes merged commit 9484e02 into main Sep 24, 2024
5 checks passed
@markusthoemmes markusthoemmes deleted the better-pr-number-extraction branch September 24, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants