Skip to content

Commit eaa4cf5

Browse files
authored
fix: remove need for gh token for linting (#12)
* fix: remove need for gh token for linting * rerun ci
1 parent be989f0 commit eaa4cf5

File tree

5 files changed

+2
-14
lines changed

5 files changed

+2
-14
lines changed

.github/workflows/tests.yml

-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ jobs:
6565
- name: run tests
6666
run: |
6767
pytest -vvs tests
68-
env:
69-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7068
7169
- name: ensure cli runs
7270
run: |

conda_forge_feedstock_ops/lint.py

-5
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121
def lint(feedstock_dir, use_container=None):
2222
"""Lint all of the recipes in a feedstock.
2323
24-
**WARNING: This function will inject the GH_TOKEN env var into
25-
the container in order to run conda-forge-specific linting.
26-
Make sure that token is read-only.**
27-
2824
Parameters
2925
----------
3026
feedstock_dir : str
@@ -74,7 +70,6 @@ def _lint_containerized(feedstock_dir):
7470
mount_readonly=True,
7571
mount_dir=tmpdir,
7672
json_loads=loads,
77-
extra_container_args=["-e", "GH_TOKEN"],
7873
)
7974

8075
# When tempfile removes tempdir, it tries to reset permissions on subdirs.

environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ platforms:
88
dependencies:
99
- click
1010
- conda-build >=3.27
11-
- conda-smithy
11+
- conda-smithy >=3.40
1212
- python-rapidjson
1313
- pyyaml
1414
- rattler-build-conda-compat >=0.0.2,<2.0.0a0

tests/conftest.py

-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
not (HAVE_CONTAINERS and HAVE_TEST_IMAGE), reason="containers not available"
4343
)
4444

45-
skipif_no_github_token = pytest.mark.skipif(
46-
"GH_TOKEN" not in os.environ, reason="no GH_TOKEN in environment"
47-
)
48-
4945

5046
@pytest.fixture(autouse=True, scope="session")
5147
def set_cf_feedstock_ops_container_tag_to_test():

tests/test_lint.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import os
22

3-
from conftest import skipif_no_containers, skipif_no_github_token
3+
from conftest import skipif_no_containers
44

55
from conda_forge_feedstock_ops.lint import lint
66

77

8-
@skipif_no_github_token
98
def test_lint_local():
109
feedstock_dir = os.path.join(os.path.dirname(__file__), "data")
1110
lints, hints = lint(

0 commit comments

Comments
 (0)