CodeYourFuture / CodeYourFuture/trainee-tracker

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

Open
#66 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
0
Forks
0
Avg merge
20m
Merged PRs (30d)
2

Description

### 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](https://github.com/CodeYourFuture/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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.