Skip to content

Add PR template and auto-close PR on subtree split repositories #58355

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

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Sep 23, 2024

Q A
Branch? 5.4
Bug fix? no
New feature? no
Deprecations? no
Issues Fix #57267
License MIT

Extract the Pull Request Template from #54653.

The GitHub action did not work as said by @nicolas-grekas #57267 (comment). Replaced by https://github.com/superbrothers/close-pull-request.

@carsonbot carsonbot added this to the 7.2 milestone Sep 23, 2024
@GromNaN GromNaN changed the base branch from 7.2 to 5.4 September 23, 2024 09:32
@symfony symfony deleted a comment from carsonbot Sep 23, 2024
@nicolas-grekas
Copy link
Member

From https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/approving-workflow-runs-from-public-forks

Workflows triggered by pull_request_target events are run in the context of the base branch. Since the base branch is considered trusted, workflows triggered by these events will always run, regardless of approval settings. For more information about the pull_request_target event, see "Events that trigger workflows."

I'm not sure why this didn't work. We might try on a dummy repo to confirm which approachs works?

@dunglas
Copy link
Member

dunglas commented Sep 23, 2024

For API Platform, we use https://github.com/superbrothers/close-pull-request.

Laravel uses the same action. It works well.

@GromNaN
Copy link
Member Author

GromNaN commented Sep 23, 2024

Adding the close-pull-request action, as it seems to work even for new contributor. On the other hand, @nicolas-grekas your script was expecting the GitHub credentials, that could explain why it's blocked for new contributors.

@GromNaN GromNaN changed the title Add PR template to warn before opening a PR on subtree split repositories Add PR template and auto-close PR on subtree split repositories Sep 23, 2024
@GromNaN GromNaN force-pushed the subtree-pr-template branch from 0e2ebb9 to e5cf2ca Compare September 23, 2024 11:34
@nicolas-grekas nicolas-grekas modified the milestones: 7.2, 5.4 Sep 25, 2024
@nicolas-grekas
Copy link
Member

Thank you @GromNaN.

@nicolas-grekas nicolas-grekas merged commit dcb690a into symfony:5.4 Sep 25, 2024
5 of 7 checks passed
@nicolas-grekas
Copy link
Member

merged up to 7.2

@GromNaN GromNaN deleted the subtree-pr-template branch September 25, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants