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

Run label check on every commit and label change #359

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

AetherUnbound
Copy link
Contributor

Description

Follow up to https://github.com/WordPress/openverse-infrastructure/pull/326 which required label checks for all merges into main, this was causing issues where a maintainer had to add & remove labels to re-trigger the check so a PR could be merged.

This action was previously set up to only run when the labels on a PR change. Since we've made this a required check, it makes sense to have this run unconditionally on every PR commit so that the check can pass (or fail) appropriately prior to a merge.

Testing Instructions

We might be able to see on this PR!

Checklist

  • My pull request has a descriptive title (not a vague title like
    Update index.md).
  • My pull request targets the default branch of the repository (main) or
    a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible
    errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@AetherUnbound AetherUnbound requested a review from a team as a code owner January 5, 2023 20:23
@AetherUnbound AetherUnbound added 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon 🤖 aspect: dx Concerns developers' experience with the codebase labels Jan 5, 2023
@openverse-bot openverse-bot added this to Needs review in Openverse PRs Jan 5, 2023
@AetherUnbound AetherUnbound added 🤖 aspect: dx Concerns developers' experience with the codebase and removed 🤖 aspect: dx Concerns developers' experience with the codebase labels Jan 5, 2023
@AetherUnbound
Copy link
Contributor Author

Shoot, now I'm worried that it'll interfere with the "Label new PR" action since those run quick and it might fail if the PR is submitted without labels but gets them from that action 😭 Let me see if we can actually expand the set of events rather than revert to the default set.

Copy link
Contributor

@stacimc stacimc left a comment

Choose a reason for hiding this comment

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

I think this makes sense! LGTM, interesting problem. Thanks for jumping on it so fast

@AetherUnbound AetherUnbound changed the title Run label check on every commit Run label check on every commit and label change Jan 5, 2023
@AetherUnbound
Copy link
Contributor Author

Okay, I think I've got a solution! This should now cover all the default PR actions (commits, opening, reopening, etc) as well as when labels are updated. I'm going to let it run after this push, then try to change the labels to make sure the actions get triggered again.

@AetherUnbound
Copy link
Contributor Author

Worked like a charm! 🥳

Copy link
Member

@zackkrida zackkrida left a comment

Choose a reason for hiding this comment

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

Ah, very nice, thanks for the work here!

Openverse PRs automation moved this from Needs review to Reviewer approved Jan 5, 2023
Copy link
Contributor

@stacimc stacimc left a comment

Choose a reason for hiding this comment

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

Re-approving, good catch :)

Copy link
Member

@krysal krysal left a comment

Choose a reason for hiding this comment

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

I was about to say it doesn't make much sense to me to run this action on every commit but it seems necessary, as this is the default config the GH action project shows. Thanks for debugging this and finding the solution!

@AetherUnbound AetherUnbound merged commit 85044c8 into main Jan 5, 2023
Openverse PRs automation moved this from Reviewer approved to Merged! Jan 5, 2023
@AetherUnbound AetherUnbound deleted the fix/pr-label-check branch January 5, 2023 20:49
dhruvkb pushed a commit that referenced this pull request Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon 🤯 ノಠ益ಠノ彡┻━┻ Aaargh!
Projects
No open projects
Openverse PRs
  
Merged!
Development

Successfully merging this pull request may close these issues.

None yet

4 participants