Skip to content

chore: create workflow to auto add labels to issues#10430

Merged
eldadfux merged 1 commit intomainfrom
chore-github-issue-auto-label
Sep 4, 2025
Merged

chore: create workflow to auto add labels to issues#10430
eldadfux merged 1 commit intomainfrom
chore-github-issue-auto-label

Conversation

@stnguyen90
Copy link
Copy Markdown
Contributor

@stnguyen90 stnguyen90 commented Sep 3, 2025

What does this PR do?

Create a GitHub workflow to automatically add labels to a GitHub issue based on title and body. The action uses .github/labeler.yml match a label using a regexp.

Test Plan

Tested using act:

gh act issues --eventpath event.json --bind="true"

with event.json

{
  "issue": {
    "number": 10428
  }
}

added "product / auth", "product / functions", and "sdk / cli" to issue appwrite/sdk-for-cli#194:

image

Related PRs and Issues

None

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 3, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Adds a new GitHub labeler configuration at .github/labeler.yml defining 18 label-to-regex mappings for product areas and features (auth, realtime, console, storage, databases, functions, migrations, messaging, relationships, vcs, graphql, assistant, domains, locale, avatars, sites, sdk/cli, self-hosted). Adds a GitHub Actions workflow at .github/workflows/auto-label-issue.yml that triggers on newly opened issues and runs github/[email protected] with configuration-path: .github/labeler.yml, include-title enabled, enable-versioned-regex disabled, and GITHUB_TOKEN from secrets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore-github-issue-auto-label

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@stnguyen90 stnguyen90 requested a review from Copilot September 3, 2025 23:06

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
binutils 2.42-r0 CVE-2025-0840 HIGH
git 2.45.3-r0 CVE-2025-46334 HIGH
git 2.45.3-r0 CVE-2025-48384 HIGH
git 2.45.3-r0 CVE-2025-48385 HIGH
git-init-template 2.45.3-r0 CVE-2025-46334 HIGH
git-init-template 2.45.3-r0 CVE-2025-48384 HIGH
git-init-template 2.45.3-r0 CVE-2025-48385 HIGH
icu 74.2-r0 CVE-2025-5222 HIGH
icu-data-en 74.2-r0 CVE-2025-5222 HIGH
icu-dev 74.2-r0 CVE-2025-5222 HIGH
icu-libs 74.2-r0 CVE-2025-5222 HIGH
libecpg 16.8-r0 CVE-2025-8714 HIGH
libecpg 16.8-r0 CVE-2025-8715 HIGH
libecpg-dev 16.8-r0 CVE-2025-8714 HIGH
libecpg-dev 16.8-r0 CVE-2025-8715 HIGH
libexpat 2.6.4-r0 CVE-2024-8176 HIGH
libpq 16.8-r0 CVE-2025-8714 HIGH
libpq 16.8-r0 CVE-2025-8715 HIGH
libpq-dev 16.8-r0 CVE-2025-8714 HIGH
libpq-dev 16.8-r0 CVE-2025-8715 HIGH
libxml2 2.12.7-r0 CVE-2024-56171 HIGH
libxml2 2.12.7-r0 CVE-2025-24928 HIGH
libxml2 2.12.7-r0 CVE-2025-27113 HIGH
libxml2 2.12.7-r0 CVE-2025-32414 HIGH
libxml2 2.12.7-r0 CVE-2025-32415 HIGH
postgresql16-dev 16.8-r0 CVE-2025-8714 HIGH
postgresql16-dev 16.8-r0 CVE-2025-8715 HIGH
pyc 3.12.9-r0 CVE-2024-12718 HIGH
pyc 3.12.9-r0 CVE-2025-4138 HIGH
pyc 3.12.9-r0 CVE-2025-4330 HIGH
pyc 3.12.9-r0 CVE-2025-4517 HIGH
python3 3.12.9-r0 CVE-2024-12718 HIGH
python3 3.12.9-r0 CVE-2025-4138 HIGH
python3 3.12.9-r0 CVE-2025-4330 HIGH
python3 3.12.9-r0 CVE-2025-4517 HIGH
python3-pyc 3.12.9-r0 CVE-2024-12718 HIGH
python3-pyc 3.12.9-r0 CVE-2025-4138 HIGH
python3-pyc 3.12.9-r0 CVE-2025-4330 HIGH
python3-pyc 3.12.9-r0 CVE-2025-4517 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2024-12718 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2025-4138 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2025-4330 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2025-4517 HIGH
sqlite-libs 3.45.3-r1 CVE-2025-29087 HIGH
xz 5.6.2-r0 CVE-2025-31115 HIGH
xz-libs 5.6.2-r0 CVE-2025-31115 HIGH
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH
stdlib 1.22.10 CVE-2025-47907 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@stnguyen90 stnguyen90 force-pushed the chore-github-issue-auto-label branch from 1c87095 to 53a5722 Compare September 3, 2025 23:10
@stnguyen90 stnguyen90 requested a review from Copilot September 3, 2025 23:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Creates a GitHub workflow to automatically label issues based on their title and body content. The workflow triggers when issues are opened and uses regex patterns to match appropriate labels.

  • Adds automated issue labeling workflow using GitHub's issue-labeler action
  • Configures comprehensive label mapping for various Appwrite product areas and features
  • Sets up appropriate permissions and debugging for the workflow

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/auto-label-issue.yml GitHub workflow configuration for automatic issue labeling
.github/labeler.yml Label mapping configuration with regex patterns for different product areas

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@stnguyen90 stnguyen90 marked this pull request as ready for review September 3, 2025 23:10
@stnguyen90 stnguyen90 force-pushed the chore-github-issue-auto-label branch from 53a5722 to ba97cfb Compare September 3, 2025 23:14
@stnguyen90 stnguyen90 requested a review from Copilot September 3, 2025 23:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/labeler.yml (1)

1-84: Add missing labels referenced in .github/labeler.yml. The following labels are absent and must be created before merging:

  • api / graphql
  • product / assistant
  • product / locale
  • product / avatars
  • product / sites
  • sdk / cli

Verify labeler workflow config. Ensure your .github/workflows/labeler.yml uses github/issue-labeler v3.4 with include-title: 1 (and consider sync-labels: 1 for proper de-labeling).

🧹 Nitpick comments (7)
.github/labeler.yml (7)

1-4: Broaden auth matches; drop redundant term.

Covers core terms well, but will miss common variants (sign-in/up, passkeys, OTP, WebAuthn). Also, oauth2 is redundant because oauth matches it. Suggest updating the regex.

-  - "(auth|session|login|logout|register|2fa|mfa|users|teams|memberships|invite|oauth|oauth2|sso|jwt)"
+  - "(auth|session|login|signin|sign-in|logout|register|signup|sign-up|password|reset|recovery|verification|verify|2fa|mfa|otp|totp|webauthn|passkey|users?|teams?|memberships?|invitation|invite|oauth|sso|jwt)"

Reference config format for this action looks correct. (github.com)


6-8: Handle singular ‘websocket’.

Add singular to avoid missing “websocket connection” in titles/bodies.

-  - "(realtime|subscribe|websockets)"
+  - "(realtime|subscribe|websocket|websockets)"

49-52: Avoid false positives with “push” (push notifications vs git push).

push alone will over-label messaging issues as VCS. Replace with more VCS-specific terms.

-  - "(repo|push|vcs|repository)"
+  - "(git|repo|repository|commit|branch|merge|pull request|pr|tag|release|vcs)"

73-76: De-duplicate domains/SSL between “domains” and “sites”.

This prevents double-labeling for the same keywords.

-  - "(site|web|hosting|domain|ssl|certificate|nextjs|nuxt|react|angular|vue|svelte|astro)"
+  - "(site|web|hosting|nextjs|nuxt|react|angular|vue|svelte|astro)"

69-72: “icon” is very broad; prefer avatar-centric terms.

Reduces accidental matches on generic UI icon issues.

-  - "(avatar|initial|flag|icon)"
+  - "(avatar(s)?|initial(s)?|flag(s)?|favicon)"

81-83: Support all self-hosting spellings.

-  - "(self-host|self host)"
+  - "(self[- ]?host(?:ed)?)"

9-12: Optional: tighten “console” scope.

If you see false positives from “browser console” mentions, consider anchoring to “Appwrite Console” explicitly: (appwrite console|console appwrite|console UI). Otherwise current regex is fine.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 53a5722 and ba97cfb.

📒 Files selected for processing (2)
  • .github/labeler.yml (1 hunks)
  • .github/workflows/auto-label-issue.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/auto-label-issue.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: Benchmark
  • GitHub Check: E2E Service Test (Site Screenshots)
  • GitHub Check: E2E Service Test (Messaging)
  • GitHub Check: E2E Service Test (VCS)
  • GitHub Check: E2E Service Test (Migrations)
  • GitHub Check: E2E Service Test (Proxy)
  • GitHub Check: E2E Service Test (Sites)
  • GitHub Check: E2E Service Test (Webhooks)
  • GitHub Check: E2E Service Test (GraphQL)
  • GitHub Check: E2E Service Test (Storage)
  • GitHub Check: E2E Service Test (Realtime)
  • GitHub Check: E2E Service Test (Teams)
  • GitHub Check: E2E Service Test (Databases)
  • GitHub Check: E2E Service Test (Account)
  • GitHub Check: E2E Service Test (Functions)
  • GitHub Check: E2E Service Test (FunctionsSchedule)
  • GitHub Check: E2E General Test
🔇 Additional comments (1)
.github/labeler.yml (1)

1-84: Overall: good coverage and correct format.

Config structure matches github/issue-labeler expectations; nice descriptive comments. (github.com)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

✨ Benchmark results

  • Requests per second: 1,025
  • Requests with 200 status code: 184,607
  • P99 latency: 0.176455472

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,025 1,001
200 184,607 180,191
P99 0.176455472 0.196568236

@eldadfux eldadfux merged commit c02574b into main Sep 4, 2025
40 checks passed
@stnguyen90 stnguyen90 deleted the chore-github-issue-auto-label branch October 1, 2025 23:58
@stnguyen90 stnguyen90 restored the chore-github-issue-auto-label branch October 24, 2025 01:51
@stnguyen90 stnguyen90 deleted the chore-github-issue-auto-label branch October 24, 2025 18:25
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.

3 participants