Skip to content

Add workflow to notify users when autoformat label is added#19178

Merged
harupy merged 4 commits intomasterfrom
copilot/add-notification-workflow
Dec 3, 2025
Merged

Add workflow to notify users when autoformat label is added#19178
harupy merged 4 commits intomasterfrom
copilot/add-notification-workflow

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

Adds a GitHub Actions workflow that notifies users when they add the autoformat label to a PR, suggesting they use the /autoformat command instead.

Changes:

  • New workflow .github/workflows/autoformat-label-notify.yml that:
    • Triggers on pull_request_target with labeled event
    • Checks if label name is autoformat
    • Posts a concise comment: "Please use /autoformat command instead of labels."
    • Automatically removes the autoformat label after posting the notification

Follows existing patterns from team-review.yml for label-triggered workflows.

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

Workflow validated with:

  • YAML syntax validation
  • Pre-commit checks (prettier, trailing whitespace, etc.)
  • CodeQL security scan

The workflow will be tested in production when a user adds the autoformat label to a PR.

Does this PR require documentation update?

  • No. You can skip the rest of this section.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Should this PR be included in the next patch release?

Yes should be selected for bug fixes, documentation updates, and other small changes. No should be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.

What is a minor/patch release?
  • Minor release: a release that increments the second part of the version number (e.g., 1.2.0 -> 1.3.0).
    Bug fixes, doc updates and new features usually go into minor releases.
  • Patch release: a release that increments the third part of the version number (e.g., 1.2.0 -> 1.2.1).
    Bug fixes and doc updates usually go into patch releases.
  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)
Original prompt

Add a workflow to notify a user if the user adds the autoformat label and suggest using /autoformat command


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add workflow to notify on autoformat label Add workflow to notify users when autoformat label is added Dec 3, 2025
Copilot AI requested a review from harupy December 3, 2025 01:11
@harupy harupy marked this pull request as ready for review December 3, 2025 01:12
@github-actions github-actions bot added area/build Build and test infrastructure for MLflow rn/none List under Small Changes in Changelogs. labels Dec 3, 2025
…changes

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy requested a review from Copilot December 3, 2025 02:05
@harupy
Copy link
Member

harupy commented Dec 3, 2025

/review


🚀 Review workflow started


✅ Review completed.

Review Output

Perfect! I've successfully reviewed the PR and found one critical issue:

Review Summary

PR: Add workflow to notify users when autoformat label is added (#19178)

Issue Found:

  1. Invalid runner label on line 14: The workflow uses ubuntu-slim which is not a valid GitHub Actions runner. This will cause the workflow to fail when triggered. I've suggested changing it to ubuntu-latest.

The rest of the workflow looks good:

  • Proper use of pull_request_target event for label triggers
  • Correct permissions set (pull-requests: write)
  • Appropriate timeout (5 minutes)
  • Pinned action version with SHA for security
  • Clean logic for posting comment and removing label

I've added a review comment with a suggestion block that can be applied with one click to fix the issue.

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

This PR adds a GitHub Actions workflow to educate users about using the /autoformat command instead of manually adding the autoformat label to pull requests.

Key Changes:

  • New workflow triggers on pull_request_target labeled events
  • Posts an informational comment and automatically removes the autoformat label
  • Follows existing repository patterns from team-review.yml

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@harupy harupy merged commit d21bfc9 into master Dec 3, 2025
38 of 59 checks passed
@harupy harupy deleted the copilot/add-notification-workflow branch December 3, 2025 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Build and test infrastructure for MLflow rn/none List under Small Changes in Changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants