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

Fix issue bot triggering on PRs and closed issues #38525

Conversation

kacperkapusciak
Copy link
Contributor

@kacperkapusciak kacperkapusciak commented Jul 20, 2023

Summary:

This PR fixes a bug with an issue labeling bot issues triggering on comments to pull requests. The action doesn't trigger when a pull request is open (but other actions add comments immediately).

From GitHub docs:

GitHub's REST API considers every pull request to be an issue, but not every issue is a pull request. [...] Pull requests have a pull_request property in the issue object.

☝️ Which is a way to differentiate between an issue and a pull request

Relates to a bug introduced in #38338 and links to ☂️#35591

Changelog:

[INTERNAL] [FIXED] - Prevent issue bot triggering on pull requests

Test Plan:

This PR makes use of github.event.issue.pull_request object which is null on issues and comments in issues:

image

and truthy on comments on pull requests

image

With a change from PR bot skips execution on comments on pull requests

image

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jul 20, 2023
@analysis-bot
Copy link

analysis-bot commented Jul 20, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,842,288 -1,533
android hermes armeabi-v7a 8,151,608 -1,338
android hermes x86 9,347,958 -1,631
android hermes x86_64 9,190,784 -1,553
android jsc arm64-v8a 9,454,278 -1,309
android jsc armeabi-v7a 8,635,602 -1,122
android jsc x86 9,537,280 -1,395
android jsc x86_64 9,780,636 -1,337

Base commit: 216865c
Branch: main

@github-actions github-actions bot added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jul 20, 2023
@facebook-github-bot
Copy link
Contributor

@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@kacperkapusciak kacperkapusciak changed the title Fix issue bot triggering on PRs Fix issue bot triggering on PRs and closed issues Jul 21, 2023
@github-actions
Copy link

This pull request was successfully merged by @kacperkapusciak in 5705661.

When will my fix make it into a release? | Upcoming Releases

@github-actions github-actions bot added the Merged This PR has been merged. label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants