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

bug: "documentation" tag not being applied to PRs #547

Closed
c-ehrlich opened this issue Oct 3, 2022 · 6 comments · Fixed by #548
Closed

bug: "documentation" tag not being applied to PRs #547

c-ehrlich opened this issue Oct 3, 2022 · 6 comments · Fixed by #548

Comments

@c-ehrlich
Copy link
Member

c-ehrlich commented Oct 3, 2022

Provide environment information

n/a

Describe the bug

Some PRs to the website/docs are not automatically getting the "Documentation" label.

Examples:

Examples of PRs that do have the tag:

It seems like PRs that include changes to .md files get the tag, but PRs that only touch other parts of the website/docs do not.

To reproduce

Open a PR that changes only non-.md website files (not 100% sure this is the pattern, but based on checking a few PRs it seems so)

Additional information

No response

@juliusmarminge
Copy link
Member

I think #551 resolves this

@c-ehrlich
Copy link
Member Author

c-ehrlich commented Oct 4, 2022

Still seems bugged, but now in a different way #559

I think this might be a solution, but I don't know if it might break other things. Will give it a try actions/labeler#399

@juliusmarminge
Copy link
Member

Still seems bugged, but now in a different way #559

I think this might be a solution, but I don't know if it might break other things. Will give it a try actions/labeler#399

is it something to do with forks? I never have that issue when PRing from local branches?

@c-ehrlich
Copy link
Member Author

c-ehrlich commented Oct 4, 2022

Still seems bugged, but now in a different way #559
I think this might be a solution, but I don't know if it might break other things. Will give it a try actions/labeler#399

is it something to do with forks? I never have that issue when PRing from local branches?

Yes, it seems to an issue related to PRs from forks.

Based on my research so far:

  • it can be resolved by running the action on pull_request_target instead of pull_request
  • however this is a security risk as pull_request_target has full read/write access, which shouldn't be granted when you use actions/checkout (reference: https://nathandavison.com/blog/github-actions-and-the-threat-of-malicious-pull-requests)
  • we could split it into two actions groups, one with the labeler on pull_request_target and the other with everything else on pull_request, but we would have to find a way to still make build-t3-app conditional on the labeler

@juliusmarminge
Copy link
Member

we could split it into two actions groups, one with the labeler on pull_request_target and the other with everything else on pull_request, but we would have to find a way to still make build-t3-app conditional on the labeler

Yea you can only check steps from the same workflow file right?

@c-ehrlich
Copy link
Member Author

I tried using on: workflow_run in #560 but didnt it to work so far

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

Successfully merging a pull request may close this issue.

2 participants