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

Repo: 'documentation' label added and removed quickly on PRs #18183

Open
JoshuaKGoldberg opened this issue Mar 9, 2024 · 6 comments
Open

Repo: 'documentation' label added and removed quickly on PRs #18183

JoshuaKGoldberg opened this issue Mar 9, 2024 · 6 comments

Comments

@JoshuaKGoldberg
Copy link
Contributor

In #18181, I sent the PR as a draft and force-pushed a few times while working on small changes. The expectation I had was that nothing would happen between force pushes to clutter the timeline shown on GitHub.

In actuality, two repo bots both took action after each push:

  1. @eslint-github-bot would add the documentation label
  2. @github-actions bot (actions/labeler) would then immediately remove the documentation label
Screenshot of the two actions steps happening after each of three force pushes

I got a chuckle out of this one. But also couldn't figure it out - why is the label being removed?

@JoshuaKGoldberg JoshuaKGoldberg changed the title Repo: Repo: 'documentation' label added and removed quickly after force-pushes to a draft PR Mar 9, 2024
@harish-sethuraman
Copy link
Member

harish-sethuraman commented Mar 10, 2024

I had mentioned something similar in this #18109 (comment)

To verify what might be wrong I re ran the labeller action in your PR. Seems like it didn't flag even after the changes were made in the docs directory. May had some issues with glob for nested routes?

But we should consider keeping this label at one place is what I feel. cc: @snitin315

also checked labeler repo and saw this (should we add the trailing /*)?
Screenshot 2024-03-10 at 11 30 53 AM

@kecrily
Copy link
Member

kecrily commented Mar 10, 2024

One thing shouldn't be done by two bots. We should choose one or the other.

@Tanujkanti4441
Copy link
Contributor

Tanujkanti4441 commented Mar 10, 2024

If we see this PR 18175 (just for example) then the new labeler is not interfering with the github bot, is it possible that the new pr-labeler adds labels only when any existing file gets change not on adding new files?

@mdjermanovic
Copy link
Member

mdjermanovic commented Mar 28, 2024

Another example: #18241

This wasn't a draft, and the label was removed right after submitting the PR.

image

@JoshuaKGoldberg JoshuaKGoldberg changed the title Repo: 'documentation' label added and removed quickly after force-pushes to a draft PR Repo: 'documentation' label added and removed quickly on PRs Mar 28, 2024
@nzakas
Copy link
Member

nzakas commented Mar 28, 2024

I think I know what's going on here. It's not that one bot is adding a label and the other is removing it. It's that the labeler action uses the set labels API to assign labels, which removes any existing labels while adding new ones.

It's possible this is a bug in the labeler action because it gets the existing labels before deciding what to do. Does anyone want to follow up on that?

@nzakas
Copy link
Member

nzakas commented Apr 2, 2024

There's an existing issue on the labeler action:
actions/labeler#763

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

No branches or pull requests

6 participants