Skip to content

Replace hardcoded maintainers with dynamic GitHub API fetch#18823

Merged
harupy merged 7 commits intomasterfrom
copilot/remove-hardcoded-maintainers
Nov 13, 2025
Merged

Replace hardcoded maintainers with dynamic GitHub API fetch#18823
harupy merged 7 commits intomasterfrom
copilot/remove-hardcoded-maintainers

Conversation

Copy link
Contributor

Copilot AI commented Nov 13, 2025

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

The maintainer approval workflow used a hardcoded list of maintainer usernames. This required manual updates when maintainers changed and could become stale.

How is this PR tested?

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

Validated filtering logic with mock data to ensure correct role-based filtering and approval checking.

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 (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

.github/workflows/require-core-maintainer-approval.js has a list of hardcoded core maintainers. We'd like to remove it and instead fetch the core maitainers dynamically by role.

  1. Use github.rest.repos.listCollaborators to fetch the list of collaborators. Make sure to handle pagination using github.paginate
  2. Filter the result to keep collaborators with role_name='admin' or role_name='maintain'. Make sure to print the filetered list to the console for debugging purposes.
  3. Replace the hardcoded list of core maintainers with the filtered list from step 2

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@harupy harupy marked this pull request as ready for review November 13, 2025 04:00
@github-actions
Copy link
Contributor

@Copilot Thank you for the contribution! Could you fix the following issue(s)?

⚠ Invalid PR template

This PR does not appear to have been filed using the MLflow PR template. Please copy the PR template from here and fill it out.

Copilot AI and others added 2 commits November 13, 2025 04:04
- Use github.rest.repos.listCollaborators with pagination
- Filter by role_name='admin' or 'maintain'
- Add console logging for debugging
- Format code with prettier

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
The github.rest.repos.listCollaborators API requires repository access.
Adding contents:read permission ensures the workflow has the necessary
permissions to fetch the collaborators list.

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove hardcoded core maintainers and fetch dynamically Replace hardcoded maintainers with dynamic GitHub API fetch Nov 13, 2025
Copilot AI requested a review from harupy November 13, 2025 04:09
@github-actions github-actions bot added area/build Build and test infrastructure for MLflow rn/none List under Small Changes in Changelogs. labels Nov 13, 2025
@harupy harupy force-pushed the copilot/remove-hardcoded-maintainers branch from 8591027 to 446dc37 Compare November 13, 2025 04:11

console.log("Core maintainers (admin or maintain role):", coreMaintainers);

const CORE_MAINTAINERS = new Set(coreMaintainers);
Copy link
Member

Choose a reason for hiding this comment

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

Can we rename CORE_MAINTAINERS with coreMaintainers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in fc7681d. Renamed to coreMaintainers for consistency.

Copilot AI and others added 2 commits November 13, 2025 13:28
- Extract logic into getCoreMaintainers() function that returns Set
- Rename CORE_MAINTAINERS to coreMaintainers for consistency
- Maintain all existing functionality

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy force-pushed the copilot/remove-hardcoded-maintainers branch from fc7681d to f44953c Compare November 13, 2025 04:31
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@harupy harupy force-pushed the copilot/remove-hardcoded-maintainers branch from 847ca86 to 7b3eef0 Compare November 13, 2025 04:39
Signed-off-by: Harutaka Kawamura <hkawamura0130@gmail.com>
@harupy harupy enabled auto-merge November 13, 2025 05:17
@harupy harupy added this pull request to the merge queue Nov 13, 2025
Merged via the queue into master with commit 39c95a7 Nov 13, 2025
43 of 45 checks passed
@harupy harupy deleted the copilot/remove-hardcoded-maintainers branch November 13, 2025 05:36
Tian-Sky-Lan pushed a commit to Tian-Sky-Lan/mlflow that referenced this pull request Nov 24, 2025
…8823)

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: Harutaka Kawamura <hkawamura0130@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Harutaka Kawamura <hkawamura0130@gmail.com>
Signed-off-by: Tian Lan <sky.blue266000@gmail.com>
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.

2 participants