@iobroker/repochecker 3.5.6 → 3.5.8

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.
package/README.md CHANGED
@@ -33,7 +33,7 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
33
33
  -->
34
34
 
35
35
  ## Changelog
36
- ### 3.5.6 (2025-05-17)
36
+ ### 3.5.8 (2025-05-17)
37
37
 
38
38
  - (mcm1957) add authorization for github using OWN_GITHUB_TOKEN.
39
39
 
package/lib/common.js CHANGED
@@ -8,17 +8,22 @@ const fs = require('node:fs/promises');
8
8
  const compareVersions = require('compare-versions');
9
9
  const semverValid = require('semver/functions/valid');
10
10
 
11
+ let gDebug = false;
12
+ let gInfo = true;
13
+ let gLocal = false;
14
+
11
15
  // disable axios caching
12
16
  axios.defaults.headers.common = {
13
17
  'Cache-Control': 'no-cache',
14
18
  Pragma: 'no-cache',
15
19
  Expires: '0',
16
- Authorization: process.env.OWN_GITHUB_TOKEN ? `token ${process.env.OWN_GITHUB_TOKEN}` : 'none',
20
+ // Authorization: process.env.OWN_GITHUB_TOKEN ? `token ${process.env.OWN_GITHUB_TOKEN}` : 'none',
17
21
  };
18
22
 
19
- let gDebug = false;
20
- let gInfo = true;
21
- let gLocal = false;
23
+ if (process.env.OWN_GITHUB_TOKEN) {
24
+ info('using authorization defined by OWN_GITHUB_TOKEN');
25
+ axios.defaults.headers.common['Authorization'] = `Bearer ${process.env.OWN_GITHUB_TOKEN}`;
26
+ }
22
27
 
23
28
  // function log(msg) {
24
29
  // console.log(`${msg}`);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.5.6",
2
+ "version": "3.5.8",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "axios": "^1.8.4",