pygitpub 0.0.51__tar.gz → 0.0.53__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pygitpub
3
- Version: 0.0.51
3
+ Version: 0.0.53
4
4
  Summary: Pygitpub will help you work with github
5
5
  Home-page: https://veltzer.github.io/pygitpub
6
6
  Download-URL: https://github.com/veltzer/pygitpub
@@ -17,9 +17,7 @@ Classifier: Operating System :: OS Independent
17
17
  Classifier: Programming Language :: Python
18
18
  Classifier: Programming Language :: Python :: 3
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
- Classifier: Programming Language :: Python :: 3.8
21
- Classifier: Programming Language :: Python :: 3.9
22
- Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
23
21
  Classifier: Topic :: Utilities
24
22
  Classifier: License :: OSI Approved :: MIT License
25
23
  Description-Content-Type: text/x-rst
@@ -27,6 +25,7 @@ License-File: LICENSE
27
25
  Requires-Dist: pytconf
28
26
  Requires-Dist: pylogconf
29
27
  Requires-Dist: PyGithub
28
+ Requires-Dist: pyapikey
30
29
 
31
30
  ==========
32
31
  *pygitpub*
@@ -42,6 +41,6 @@ project website: https://veltzer.github.io/pygitpub
42
41
 
43
42
  author: Mark Veltzer
44
43
 
45
- version: 0.0.51
44
+ version: 0.0.53
46
45
 
47
- Mark Veltzer <mark.veltzer@gmail.com>, Copyright © 2022, 2023
46
+ Mark Veltzer <mark.veltzer@gmail.com>, Copyright © 2022, 2023, 2024
@@ -12,6 +12,6 @@ project website: https://veltzer.github.io/pygitpub
12
12
 
13
13
  author: Mark Veltzer
14
14
 
15
- version: 0.0.51
15
+ version: 0.0.53
16
16
 
17
- Mark Veltzer <mark.veltzer@gmail.com>, Copyright © 2022, 2023
17
+ Mark Veltzer <mark.veltzer@gmail.com>, Copyright © 2022, 2023, 2024
@@ -11,11 +11,8 @@ class ConfigGithub(Config):
11
11
  username = ParamCreator.create_str(
12
12
  help_string="What is your github username?",
13
13
  )
14
- token = ParamCreator.create_str(
15
- help_string="What is your github token?",
16
- )
17
- token_name = ParamCreator.create_str(
18
- help_string="What is the name of the token on github?",
14
+ apikey = ParamCreator.create_str(
15
+ help_string="What is the name of your apikey (see pyapikey)?",
19
16
  )
20
17
 
21
18
 
@@ -11,6 +11,7 @@ import pylogconf.core
11
11
  from pytconf import register_main, config_arg_parse_and_launch, register_endpoint
12
12
 
13
13
  import github
14
+ import pyapikey
14
15
  from pygitpub.configs import ConfigGithub, ConfigOutput, ConfigAlgo
15
16
  import pygitpub.static
16
17
  from pygitpub.utils.misc import delete, get_all_git_repos
@@ -18,7 +19,8 @@ from pygitpub.utils.importlib import import_file
18
19
 
19
20
 
20
21
  def yield_repos():
21
- g = github.Github(login_or_token=ConfigGithub.token)
22
+ apikey = pyapikey.get_key(ConfigGithub.apikey)
23
+ g = github.Github(login_or_token=apikey)
22
24
  for repo in g.get_user().get_repos():
23
25
  reason = "no reason set"
24
26
  skip = False
@@ -147,13 +149,16 @@ def runs_cleanup() -> None:
147
149
  # if it's a pages build delete it unless it's in mid work (run.conclusion is None)
148
150
  if workflow.name == "pages-build-deployment" and run.conclusion is not None:
149
151
  delete_it = True
152
+ # if it's not on the master branch, delete it
153
+ if run.head_branch != "master":
154
+ delete_it = True
150
155
  # if it's not a paged build and it failed then delete it
151
156
  if workflow.name != "pages-build-deployment" and run.conclusion == "failure":
152
157
  delete_it = True
153
158
  if existing >= 4:
154
159
  delete_it = True
155
160
  if delete_it:
156
- print(f"deleting {repo.name} {workflow.name} {run.conclusion} {run.url}")
161
+ print(f"deleting {repo.name} {workflow.name} {run.head_branch} {run.conclusion} {run.url}")
157
162
  delete(run)
158
163
  else:
159
164
  existing += 1
@@ -1,5 +1,5 @@
1
1
  """ version which can be consumed from within the module """
2
- VERSION_STR = "0.0.51"
2
+ VERSION_STR = "0.0.53"
3
3
  DESCRIPTION = "Pygitpub will help you work with github"
4
4
  APP_NAME = "pygitpub"
5
5
  LOGGER_NAME = "pygitpub"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pygitpub
3
- Version: 0.0.51
3
+ Version: 0.0.53
4
4
  Summary: Pygitpub will help you work with github
5
5
  Home-page: https://veltzer.github.io/pygitpub
6
6
  Download-URL: https://github.com/veltzer/pygitpub
@@ -17,9 +17,7 @@ Classifier: Operating System :: OS Independent
17
17
  Classifier: Programming Language :: Python
18
18
  Classifier: Programming Language :: Python :: 3
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
- Classifier: Programming Language :: Python :: 3.8
21
- Classifier: Programming Language :: Python :: 3.9
22
- Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
23
21
  Classifier: Topic :: Utilities
24
22
  Classifier: License :: OSI Approved :: MIT License
25
23
  Description-Content-Type: text/x-rst
@@ -27,6 +25,7 @@ License-File: LICENSE
27
25
  Requires-Dist: pytconf
28
26
  Requires-Dist: pylogconf
29
27
  Requires-Dist: PyGithub
28
+ Requires-Dist: pyapikey
30
29
 
31
30
  ==========
32
31
  *pygitpub*
@@ -42,6 +41,6 @@ project website: https://veltzer.github.io/pygitpub
42
41
 
43
42
  author: Mark Veltzer
44
43
 
45
- version: 0.0.51
44
+ version: 0.0.53
46
45
 
47
- Mark Veltzer <mark.veltzer@gmail.com>, Copyright © 2022, 2023
46
+ Mark Veltzer <mark.veltzer@gmail.com>, Copyright © 2022, 2023, 2024
@@ -1,3 +1,4 @@
1
1
  pytconf
2
2
  pylogconf
3
3
  PyGithub
4
+ pyapikey
@@ -9,7 +9,7 @@ def get_readme():
9
9
  setuptools.setup(
10
10
  # the first three fields are a must according to the documentation
11
11
  name="pygitpub",
12
- version="0.0.51",
12
+ version="0.0.53",
13
13
  packages=[
14
14
  "pygitpub",
15
15
  "pygitpub.utils",
@@ -36,6 +36,7 @@ setuptools.setup(
36
36
  "pytconf",
37
37
  "pylogconf",
38
38
  "PyGithub",
39
+ "pyapikey",
39
40
  ],
40
41
  classifiers=[
41
42
  "Development Status :: 4 - Beta",
@@ -44,9 +45,7 @@ setuptools.setup(
44
45
  "Programming Language :: Python",
45
46
  "Programming Language :: Python :: 3",
46
47
  "Programming Language :: Python :: 3 :: Only",
47
- "Programming Language :: Python :: 3.8",
48
- "Programming Language :: Python :: 3.9",
49
- "Programming Language :: Python :: 3.10",
48
+ "Programming Language :: Python :: 3.11",
50
49
  "Topic :: Utilities",
51
50
  "License :: OSI Approved :: MIT License",
52
51
  ],
File without changes
File without changes