Skip to content

feat: add gh issue label logic #4863

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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

rahalan
Copy link
Contributor

@rahalan rahalan commented Mar 25, 2025

Description

For all open AVM issue, assignment of the module owner or orphaned label assignment is checked and corrected.

Pipeline Reference

Pipeline

Type of Change

  • Update to CI Environment or utilities (Non-module affecting changes)
  • Azure Verified Module updates:
    • Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in version.json:
      • Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description.
      • The bug was found by the module author, and no one has opened an issue to report it yet.
    • Feature update backwards compatible feature updates, and I have bumped the MINOR version in version.json.
    • Breaking changes and I have bumped the MAJOR version in version.json.
    • Update to documentation

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • I have run Set-AVMModule locally to generate the supporting module files.
  • My corresponding pipelines / checks run clean and green without any errors or warnings

@rahalan rahalan self-assigned this Mar 25, 2025
@rahalan rahalan added Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: CI 🚀 This issue is related to the AVM CI labels Mar 25, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 Maintainers need to triage still label Mar 25, 2025
name: .Platform - Set GitHub issue label

on:
schedule:
Copy link
Contributor

Choose a reason for hiding this comment

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

If the logic is the same I'd suggest a single platform pipeline, running on schedule as well as on issue creation (issues types [opened])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eriqua it is the same logic, but the issue creation one only looks into one issue (the new one), while the scheduled one looks at all open issues, so there is a loop into it, that calls the other logic

Copy link
Contributor

Choose a reason for hiding this comment

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

My suggestion would be to merge the 2 and use github.event_name to check which event triggered the workflow. Based on that call the corresponding intended logic.

However, given another PR #4987 was opened meanwhile and updating some of the common logic, I'd suggest to have this PR in to allow the review of the other one. Then, think about the optimization later.

@rahalan rahalan marked this pull request as ready for review March 31, 2025 14:44
@rahalan rahalan requested review from a team as code owners March 31, 2025 14:44
@avm-team-linter avm-team-linter bot added the Needs: Core Team 🧞 This item needs the AVM Core Team to review it label Mar 31, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

Was the logic tested locally? I'd suggest the following test coverage:

  1. create a test issue on an owned module, run the logic and verify the owner is assigned
  2. assign the orphaned label on the owned test issue, run the logic and verify the label is removed
  3. create a test issue on an orphaned module, run the logic and verify the orphaned label is assigned
  4. assign an owner to the orphaned test issue, run the logic and verify the owner is unassigned

rahalan and others added 4 commits April 10, 2025 14:53
Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
@rahalan rahalan marked this pull request as draft April 10, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Core Team 🧞 This item needs the AVM Core Team to review it Needs: Triage 🔍 Maintainers need to triage still Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: CI 🚀 This issue is related to the AVM CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants