Skip to content

Bug: Issue created by other users causes PR metadata validation to fail #66

Description

@cjyuan

The Bug

When a trainee performed an action on a PR that triggered the metadata validation, the validation failed.
What I expected: The metadata validation failed because the trainee did something that invalidated their PR.
What actually happened: The metadata validation failed because of an issue created by another user on CYF's repo.

This happened on Module-Structuring-and-Testing-Data. The validation failed because the issue created by a staff member didn't have a "Sprint" label (but it has "NotCoursework", "bug", and "Module Structuring-and-Testing-Data" labels).

https://github.com/CodeYourFuture/Module-Structuring-and-Testing-Data/actions/runs/22956749577/job/66635522785?pr=1215

thread 'main' (2534) panicked at src/bin/pr-metadata-validator.rs:64:6:
Failed to validate PR: UserFacing("Failed to parse issue https://github.com/CodeYourFuture/Module-Structuring-and-Testing-Data/issues/1246 - no submit label.\n\nIf this issue was made my a curriculum team member it should be given a sprint label.\nIf this issue was created by a trainee for step submission, it should probably be closed (and they should create the issue in their fork).")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Process completed with exit code 101.

After I added a "Sprint" label to the issue, and did something in the PR to trigger validation, the validation passed.


Note: A few incidents like this happened in Module-Onboarding when some trainees mistakenly created their "Step 1" issue on CYF's repo instead of on their own account.

Steps to reproduce

  • Create an issue without any label on Module-Structuring-and-Testing-Data repo
  • Submit a valid Sprint's PR on the repo

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions