sunchaser-lilu opened a new pull request, #10661: URL: https://github.com/apache/dubbo/pull/10661
## What is the purpose of the change Try using GitHub action to check and automatically add ASF license header. This PR contains two commits, the first commit is submitted by me, the content is to add GitHub action and configuration file .licenserc.yaml, and the second commit is to use License Bot/[email protected] account in GitHub action automatically submitted. As you can see, the two files .codecov.yml and .travis.yml have no ASF license header added, so the GitHub action automatically adds the ASF license header and commits it. It is worth noting that this requires the GitHub action. The configuration item permissions.contents has been changed from read to write. I'm not very sure whether this change will bring some bad consequences, but everything is normal at present. Another point to note is that there are some files in the source code that reference other open source licenses, so you need to ignore the check for these files, such as dubbo-common/src/main/java/org/apache/dubbo/common/threadlocal /InternalThreadLocal.java, the complete list can be viewed in the header.paths-ignore configuration of the .licenserc.yaml file. Because of this, if we introduce other open source licenses in the future development process, we need to add them to the header.paths-ignore configuration item of the .licenserc.yaml file to ignore, otherwise the ASF license may be added repeatedly by mistake. header and commit, this is a hidden danger. Including if you add an ASF license header containing a spelling error, the GitHub action will also repeatedly add the ASF license header and commit by mistake, so either do not add the ASF license header and be automatically added by the GitHub action, or add the exact ASF license header. The account for committing in GitHub action is License Bot/[email protected]. If there are any that do not meet the requirements, you can replace them with others. This account does not seem to have an avatar. In short, this can save us the step of copying and pasting the ASF license header for each new file, which can be said to improve the efficiency of research and development. Finally, thanks. ## Brief changelog ## Verifying this change Maybe you can look at the log of the GitHub action below to verify some: [https://github.com/sunchaser-lilu/dubbo/actions/runs/3110713547/jobs/5042180021](https://github.com/sunchaser-lilu/dubbo/actions/runs/3110713547/jobs/5042180021) <!-- Follow this checklist to help us incorporate your contribution quickly and easily: --> ## Checklist - [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. - [x] Each commit in the pull request should have a meaningful subject line and body. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7 - [x] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in [dubbo samples](https://github.com/apache/dubbo-samples) project. - [x] Add some description to [dubbo-website](https://github.com/apache/dubbo-website) project if you are requesting to add a feature. - [x] GitHub Actions works fine on your own branch. - [x] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/dubbo/wiki/Software-donation-guide). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
