Title: Fall back to GITHUB_SHA env var if git is not available by robertbrignull · Pull Request #84 · github/codeql-action · GitHub
Open Graph Title: Fall back to GITHUB_SHA env var if git is not available by robertbrignull · Pull Request #84 · github/codeql-action
X Title: Fall back to GITHUB_SHA env var if git is not available by robertbrignull · Pull Request #84 · github/codeql-action
Description: There have been problems regarding a new dependency on being able to run git commands. In some environment git is not present, or a .git directory is not created unless git is a high-enough version. In other cases people want to analyze without a full checkout, for example analysing container images. This PR means we still try to use git to get the current commit, because we need to do this in the case of PR integration. However if that fails for any reason then we almost silently give up and just return the commit SHA from the environment. I argue this will be correct in almost all situations, and even if it was incorrect the fallout from alerts appearing on the wrong commit is not too bad in the case of pull requests and likely understandable to the user. I've tested this with a self-hosted runner that did not have a high enough version of git, and it failed on the main branch but succeeded with this branch. Merge / deployment checklist Run test builds as necessary. Can be on this repository or elsewhere as needed in order to test the change - please include links to tests in other repos! CodeQL using init/analyze actions 3rd party tool using upload action Confirm this change is backwards compatible with existing workflows. Confirm the readme has been updated if necessary.
Open Graph Description: There have been problems regarding a new dependency on being able to run git commands. In some environment git is not present, or a .git directory is not created unless git is a high-enough version...
X Description: There have been problems regarding a new dependency on being able to run git commands. In some environment git is not present, or a .git directory is not created unless git is a high-enough version...
Opengraph URL: https://github.com/github/codeql-action/pull/84
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4a3de8fc-5ac6-18d8-7fdc-51d3ca4a3492 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B678:3A03DF:661791:8E181A:6A5385AB |
| html-safe-nonce | c04c5ff9c8dd0315d9d18a884bf5eed9286a52d577b6fea7f50a689643f8715d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjc4OjNBMDNERjo2NjE3OTE6OEUxODFBOjZBNTM4NUFCIiwidmlzaXRvcl9pZCI6IjMwMzk2NzQyNTEyNDQ0Mzg5NTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | acfacb163cc141583fd06400bd4ca5225b42dfc8f7928a860c68ae284e89689f |
| hovercard-subject-tag | pull_request:440090732 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/github/codeql-action/pull/84/files |
| twitter:image | https://avatars.githubusercontent.com/u/3749000?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3749000?s=400&v=4 |
| og:image:alt | There have been problems regarding a new dependency on being able to run git commands. In some environment git is not present, or a .git directory is not created unless git is a high-enough version... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/github/codeql-action git https://github.com/github/codeql-action.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 259445878 |
| octolytics-dimension-repository_nwo | github/codeql-action |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 259445878 |
| octolytics-dimension-repository_network_root_nwo | github/codeql-action |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width