Skip to content
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

Consolidate PR validation into one file with multiple jobs #2831

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

nguerrera
Copy link
Contributor

@nguerrera nguerrera commented Oct 25, 2024

Turns out the job name is the only things that shows in mobile and branch protection. Worse, if you try to protection when there are duplicate job names, it doesn't seem to work.

This consolidates everything for PR into one .yml and gives the jobs names. I have already set the branch protection and you can see that the newly consolidated jobs are required.

@nguerrera
Copy link
Contributor Author

Possibly unclear from the title and description. Other PRs will be unmergeable until this one merges to sync with changes made in GitHub admin backend.

@suvamM
Copy link
Collaborator

suvamM commented Oct 25, 2024

@nguerrera The problem this PR is trying to solve isn't immediately clear to me. I see all the existing jobs are present in the consolidated file though, so I won't block this.

@nguerrera
Copy link
Contributor Author

For posterity:

The blocking issue was that both build-and-test and build-multitool-for-npm had jobs named simply "run". It turns out that the job name must be unique. And in some contexts, branch protection and mobile github app, only the job name shows. So you would see only "Run" and not build-and-test and build-multitool-for-npm. Worse, you could not require these duplicate "run" jobs.

I decided that putting everything in one file is a simple way to guarantee that these names are always good and unique. :)

@nguerrera nguerrera merged commit 1de133e into microsoft:main Oct 25, 2024
7 checks passed
@nguerrera nguerrera deleted the consolidate-pr-validation branch October 25, 2024 19:57
@nguerrera
Copy link
Contributor Author

I put these details in the commit description too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants