-
-
Notifications
You must be signed in to change notification settings - Fork 25
Add docker_image mirroring #238
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
Open
Horstage
wants to merge
3
commits into
pre-commit:main
Choose a base branch
from
Horstage:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
pre_commit_mirror_maker/docker_image/.pre-commit-hooks.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- id: {id} | ||
name: {name} | ||
description: {description!r} | ||
entry: '{entry}:{version}' | ||
language: {language} | ||
'{match_key}': {match_val} | ||
args: {args} | ||
require_serial: {require_serial} | ||
additional_dependencies: {additional_dependencies} | ||
minimum_pre_commit_version: {minimum_pre_commit_version!r} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,3 +236,43 @@ def test_rust_integration(in_git_dir): | |
assert _cmd('git', 'log', '--oneline') | ||
|
||
# TODO: test that the package is installable | ||
|
||
|
||
def test_docker_image_integration(in_git_dir): | ||
make_repo( | ||
'.', | ||
language='docker_image', name='alpine/flake8', description='', | ||
entry='alpine/flake8', id='flake8-docker', match_key='files', | ||
match_val=r'\.py$', args='[]', require_serial='false', | ||
minimum_pre_commit_version='0', | ||
) | ||
# Our files should exist | ||
assert in_git_dir.join('.version').exists() | ||
assert in_git_dir.join('.pre-commit-hooks.yaml').exists() | ||
|
||
# Should have made _some_ tags | ||
assert _cmd('git', 'tag', '-l') | ||
# Should have made _some_ commits | ||
assert _cmd('git', 'log', '--oneline') | ||
|
||
# TODO: test that the package is installable | ||
|
||
|
||
def test_docker_image_integration_official_repo(in_git_dir): | ||
make_repo( | ||
'.', | ||
language='docker_image', name='python', description='', | ||
entry='python', id='python-docker', match_key='files', | ||
match_val=r'\.py$', args='[]', require_serial='false', | ||
minimum_pre_commit_version='0', | ||
) | ||
Comment on lines
+261
to
+268
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really a valid pre-commit hook, but there are so few in the official repo 🤷 |
||
# Our files should exist | ||
assert in_git_dir.join('.version').exists() | ||
assert in_git_dir.join('.pre-commit-hooks.yaml').exists() | ||
|
||
# Should have made _some_ tags | ||
assert _cmd('git', 'tag', '-l') | ||
# Should have made _some_ commits | ||
assert _cmd('git', 'log', '--oneline') | ||
|
||
# TODO: test that the package is installable |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be a controversial decision, but I want to keep the git tags in sync with the docker tags.