Skip to content
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

Use GitHub REST API to determine files changed in clang-tidy workflow #56454

Merged
merged 2 commits into from
Apr 4, 2022

Conversation

BrettDong
Copy link
Member

@BrettDong BrettDong commented Mar 29, 2022

Summary

None

Purpose of change

Describe the solution

GitHub provides an API to list changed files in a pull request: https://docs.github.com/en/rest/reference/pulls#list-pull-requests-files. Use this API in clang-tidy GitHub Actions workflow to determine what files are changed in the pull request.

Also moved clang-tidy to a dedicated script for easier maintenance in the future.

Describe alternatives you've considered

Try to fix the current method of getting the list of changed files.

Testing

Rebased to master branch, and clang-tidy check started successfully and only analyzed the changed .cpp file: https://github.com/CleverRaven/Cataclysm-DDA/actions/runs/2063968956

Additional context

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments Code: Tooling Tooling that is not part of the main game but is part of the repo. json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Mar 29, 2022
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 30, 2022
@BrettDong BrettDong marked this pull request as ready for review March 30, 2022 10:36
@kevingranade kevingranade merged commit d97942c into CleverRaven:master Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments Code: Tooling Tooling that is not part of the main game but is part of the repo. <Documentation> Design documents, internal info, guides and help. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clang-tidy action times out under certain conditions
2 participants