Use GH action version when version argument not specified #3543
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Resolves #3382
There are 2 things going on here:
.git_archival.txt
set withexport-subst
git attribute so that black can be installed from a git archive, see: https://github.com/pypa/setuptools_scm#git-archivesA couple of tests:
Jackenmen/[email protected]
- 22.12.0 on my repo is not the real commit of 22.12.0 as then it wouldn't have this feature; however it does allow you to see that the code gets 2022 formatting:Jackenmen/black@e29e12c973d0e294a0a905b1fb4d8f4962bfa408
- the exact same commit that you get with 22.12.0, just confirming that it still correctly detects it as a tagged release in such a case:Jackenmen/black@9a168472de3144674dd7db3c6b514b7e5f5d5c20
- an untagged commit after the fake 22.12.0 tag, this causes the action to install Black from the local source; you can see that this causes it to use 2023 formatting:Jackenmen/black@stable
- the exact same commit that you get with 22.12.0, just confirming that it correctly fetches 22.12.0:Checklist - did you ...
CHANGES.md
if necessary?