apache / fury

A blazingly fast multi-language serialization framework powered by JIT and zero-copy.
https://fury.apache.org/
Apache License 2.0
2.94k stars 216 forks source link

Remove commented content in git commit message #1588

Open chaokunyang opened 4 months ago

chaokunyang commented 4 months ago

Is your feature request related to a problem? Please describe.

Currently there are many comments contents in PR.

<!--
**Thanks for contributing to Fury.**

**If this is your first time opening a PR on fury, you can refer to [CONTRIBUTING.md](https://github.com/apache/incubator-fury/blob/main/CONTRIBUTING.md).**

Contribution Checklist

    - The **Apache Fury (incubating)** community has restrictions on the naming of pr titles. You can also find instructions in [CONTRIBUTING.md](https://github.com/apache/incubator-fury/blob/main/CONTRIBUTING.md).

    - Fury has a strong focus on performance. If the PR you submit will have an impact on performance, please benchmark it first and provide the benchmark result here.
-->

## What does this PR do?

<!-- Describe the purpose of this PR. -->

## Related issues

<!--
Is there any related issue? Please attach here.

- #xxxx0
- #xxxx1
- #xxxx2
-->

## Does this PR introduce any user-facing change?

<!--
If any user-facing interface changes, please [open an issue](https://github.com/apache/incubator-fury/issues/new/choose) describing the need to do so and update the document if necessary.
-->

- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?

## Benchmark

<!--
When the PR has an impact on performance (if you don't know whether the PR will have an impact on performance, you can submit the PR first, and if it will have impact on performance, the code reviewer will explain it), be sure to attach a benchmark data here.
-->

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

urlyy commented 1 month 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. image and it works on my demo image 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?

chaokunyang commented 1 month ago

Of course, feel free to study this at your own pace. This is not urgent

urlyy commented 1 month ago

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. image

urlyy commented 1 month ago

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.

chaokunyang commented 1 month ago

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?

urlyy commented 1 month ago

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