Skip to content

Add github workflow for automatic API, topic, and component labeling of issues#36712

Closed
SlyCaptainFlint wants to merge 5 commits intofacebook:mainfrom
SlyCaptainFlint:olga/descriptive-labels
Closed

Add github workflow for automatic API, topic, and component labeling of issues#36712
SlyCaptainFlint wants to merge 5 commits intofacebook:mainfrom
SlyCaptainFlint:olga/descriptive-labels

Conversation

@SlyCaptainFlint
Copy link
Copy Markdown
Contributor

@SlyCaptainFlint SlyCaptainFlint commented Mar 29, 2023

Summary:

Adding a new github workflow script, which will run as part of the existing triage job that is triggered when an issue is labeled with the "Needs: Triage" label (this typically happens automatically when the issue is created).
This script will add an extensive list of possible labels corresponding to APIs, components, and topics (see the code for the full list).
The motivation for this change is to replace the last bit of meaningful functionality performed by react-native-bot, which will allow us to decommission that bot in favor of using github workflows for all issue and PR automation.

Changelog:

[INTERNAL] [CHANGED] - Updated API, topic, component labeling on issues to run from a GH workflow rather than an external bot action

Test Plan:

For examples of issues being labeled by this new script, see the open issues here: https://github.com/SlyCaptainFlint/react-native/issues
I did not test every possible label, but I tested at least one from each category (API, component, topic), and a combination of one or two of each.

@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. p: Facebook Partner: Facebook Partner labels Mar 29, 2023
@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Mar 30, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,575,839 +0
android hermes armeabi-v7a 7,890,222 +0
android hermes x86 9,058,605 +0
android hermes x86_64 8,913,195 +0
android jsc arm64-v8a 9,174,235 +0
android jsc armeabi-v7a 8,364,654 +0
android jsc x86 9,231,764 +0
android jsc x86_64 9,489,156 +0

Base commit: 9909711
Branch: main

@cipolleschi
Copy link
Copy Markdown
Contributor

Accepted to unblock you, but I think we should fix the includes check in the logic.

Copy link
Copy Markdown
Contributor

@kelset kelset left a comment

Choose a reason for hiding this comment

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

LGTM

only nit: I wonder if there's a more future-proof way to list the components/apis/topics so that it's not a manually maintained list in the new file... is there a way we could fetch them from gh itself?

@SlyCaptainFlint
Copy link
Copy Markdown
Contributor Author

I wonder if there's a more future-proof way to list the components/apis/topics so that it's not a manually maintained list in the new file... is there a way we could fetch them from gh itself?

I like this idea a lot, though looking through the GH API, nothing jumps out at me as immediately helpful in this regard. Is there a source of truth, other than code (and the RN docs, which are not hosted on GH) for API, component, and topic lists today?

@kelset
Copy link
Copy Markdown
Contributor

kelset commented Mar 31, 2023

Is there a source of truth, other than code (and the RN docs, which are not hosted on GH) for API, component, and topic lists today?

sadly, I don't think so 😥

Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Q for @SlyCaptainFlint: does this mirror the previous logic of react-native-bot? Asking as I believe we were checking also in the body somehow?

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@SlyCaptainFlint
Copy link
Copy Markdown
Contributor Author

Q for @SlyCaptainFlint: does this mirror the previous logic of react-native-bot? Asking as I believe we were checking also in the body somehow?

The only tag that was being applied based on information present in the issue body is Platform: Linux - when the envinfo included Linux. The other platforms (macOS, Windows) were commented out a few years ago, for reasons I couldn't figure out based on commit history. It didn't feel worth it to me to add in those additional checks just for the Linux tag, but if you find that tag useful, I can add it.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 4, 2023
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@SlyCaptainFlint merged this pull request in d038e4e.

@SlyCaptainFlint SlyCaptainFlint deleted the olga/descriptive-labels branch April 4, 2023 23:06
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. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants