fs24-chrter opened a new pull request, #9387:
URL: https://github.com/apache/devlake/pull/9387
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
### ⚠️ Pre Checklist
> Please complete _ALL_ items in this checklist, and remove before submitting
- [ ] I have read through the [Contributing
Documentation](https://devlake.apache.org/community/).
- [ ] I have added relevant tests.
- [ ] I have added relevant documentation.
- [ ] I will add labels to the PR, such as `pr-type/bug-fix`,
`pr-type/feature-development`, etc.
<!--
Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes.
Please fill out as many sections below as possible.
-->
### Summary
This PR fixes GitHub bots being incorrectly classified as human accounts
when collecting data through REST and GraphQL.
- GraphQL: Requests __typename to distinguish bots from users reliably.
Previously, the decoder could populate both fragments and cause bots to be
treated as users.
- REST: Adds [bot] to usernames when GitHub explicitly returns type: "Bot",
including aliases such as Copilot. This preserves bot detection during account
conversion.
- Across repositories: Keeps bot classification intact when different
repositories and collection methods update the same account, using its numeric
GitHub ID.
- Regression coverage: Adds unit and end-to-end tests for decoder behavior,
REST aliases, historical data, and repeated conversion across repositories.
### Does this close any open issues?
Closes #9385
--
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]