Open chaokunyang opened 4 months ago
That's strange. Do you copy the PR body into the merge description when confirming a merge? If so, I think we can modify the PR raw text body automatically after people create the PR. I found a GitHub Actions plugin: Update PR Description that works as follows.
and it works on my demo
However, for this issue, it might be necessary to create a custom action plugin. I'd like to take this on, but I'm not very familiar with writing action plugins. Could you allow me a few days to study this and then we can continue the discussion?
Of course, feel free to study this at your own pace. This is not urgent
I have created a github action: Remove markdown comments in PR, detail usage are provided in its README. But if <!-- comment -->
in PR body code blocks
, it will also be removed.
I have tested it in my own copied repository, and it is effective, you can see in https://github.com/urlyy/fury_action_test/pull/1. But I don't know if you are satisfied with this effect, and whether submitting a PR about modifying the project's CI/CD is dangerous. Looking forward to your reply.
I will take a look later. It needs a token, we need to ensure it's safe. I'm not familiar with github action. BTW, this is a common issue, is there any github action which has implemented this feature?
I will take a look later. It needs a token, we need to ensure it's safe. I'm not familiar with github action. BTW, this is a common issue, is there any github action which has implemented this feature?
Sorry, I didn't spend much time searching to see if relavant github action exists. I'll go check it out now.
And if you want to know the process of my action ,only need to look at the index.js
and action.yml
, the dist
directory is generated by index.js
and something else, I learned at https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action#commit-tag-and-push-your-action-to-github.
And for https://github.com/urlyy/fury_action_test/pull/1 , I just add a yaml file at https://github.com/urlyy/fury_action_test/blob/main/.github/workflows/remove-pr-comment.yaml
Is your feature request related to a problem? Please describe.
Currently there are many comments contents in PR.
If contributor doesn't remove it, it will be included in the commited message, which make the git history kinds of messy.
Describe the solution you'd like
We should remove such conents automatically before merge PR
Additional context
1477