Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Dev doc preview should only be run on maintainer PRs #692

Closed
1 task
AetherUnbound opened this issue May 10, 2022 · 8 comments · Fixed by #693 or #797
Closed
1 task

Dev doc preview should only be run on maintainer PRs #692

AetherUnbound opened this issue May 10, 2022 · 8 comments · Fixed by #693 or #797
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix good first issue New-contributor friendly help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon

Comments

@AetherUnbound
Copy link
Contributor

Description

We ran into an issue in #690 wherein the docs preview failed to run because the PR was opened from a fork. The easiest way to address this is to prevent the docs preview action from running on forks.

Additional context

Resolution

  • 🙋 I would be interested in resolving this bug.
@AetherUnbound AetherUnbound added 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents 🤖 aspect: dx Concerns developers' experience with the codebase labels May 10, 2022
@AetherUnbound AetherUnbound reopened this May 18, 2022
@AetherUnbound
Copy link
Contributor Author

I rebased #648 onto main, which includes the change from #693, but the docs preview still ran (and failed) on the fork PR.

@AetherUnbound
Copy link
Contributor Author

I believe this has been addressed with #750

@AetherUnbound
Copy link
Contributor Author

Unfortunately this is still an issue 😞 See #767

@AetherUnbound AetherUnbound reopened this Jun 24, 2022
@sarayourfriend
Copy link
Contributor

Is it because we're checking that the event is a pull_request? Isn't that check redundant to the configuration of the workflow itself? Based on the advice given the GitHub support forums it seems like just checking that the repository name is WordPress/openverse* should be enough (though that thread says nothing of dependabot).

@dhruvkb
Copy link
Member

dhruvkb commented Jun 28, 2022

@sarayourfriend
Copy link
Contributor

I wonder why the recommended approach doesn't work though?

@dhruvkb
Copy link
Member

dhruvkb commented Jun 30, 2022

@sarayourfriend from my understanding, the support forum question was to prevent GitHub Actions defined in the upstream from running on a fork. But when a PR from the fork is made to the upstream repo, the PRs are running in the upstream context so the condition evaluates to true. In such a case we need to check if the PR head is also part of the upstream repo (as we did in the frontend).

@sarayourfriend
Copy link
Contributor

I see! Thanks for explaining. It's strange that the way to do this is so obtuse 🤔

@dhruvkb dhruvkb added good first issue New-contributor friendly help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon and removed 🟧 priority: high Stalls work on the project or its dependents labels Jul 12, 2022
zackkrida added a commit that referenced this issue Jul 12, 2022
Fixes #692, I think!
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix good first issue New-contributor friendly help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon
Projects
None yet
3 participants