Policy/thoughts on common modules?
#1
I'm planning to make a common module on which my other add-ons will depend - just so I can get away from manually maintaining this same code in a bunch of addons. 
(This common module just has basic typical things like handy constants, some logging stuff, code to get settings in the right way etc).

I can see a few other examples of this (jurialmonkey etc) - but just wanted to check before I go to the effort...in short, it's just a PITA maintaining code that is the same for 8+ separate addons (4 in the main Kodi repo currently with another two there on the way, plus some in my own repo).

i.e. I want to make & submit to the main Kodi repo:
script.module.bossanova808

And then (or at the same time I guess) - I would modify these add-ons to use it:
[In Kodi Addon Repo]
weather.ozweather
script.service.checkpreviousepisode
script.service.playbackresumer
script.xbmc.unpausejumpback
...plus two new ones - coming Soon to Kodi main repo if all goes to plan]

[In my own repo]
script.kodi.yoctodisplay (uses pre-compiled binaries to talk to hardware, so am told can't go in main repo)
script.ozweather-skinpatcher (patches a variety of skins for better OzWeather support, am told this is also not suitable for the main repo)


Questions:
Is this ok to do?  I.e. will it pass the Kodi repo gatekeepers in this form (i.e. this code is already in the repo, just as 4 separately maintained files currently!)
Is there a better way to approach this?
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | Caber Toss | Switchback | XSqueezeDisplay | Kodi 2nd Display
Sorry, no help w/out a *full debug log*.
Reply
#2
I'ts totally OK and even preferable to move common code into a library addon. The best way would be to submit the library addon itself first. Just add a comment in a PR message that you plan to use this library in your other addons that will be submitted later.
Reply
#3
That's great, thanks, will proceed with the plan then!
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | Caber Toss | Switchback | XSqueezeDisplay | Kodi 2nd Display
Sorry, no help w/out a *full debug log*.
Reply
#4
@Roman_V_M  - proceeding with this - it has been a while since I've submitted a new addon. 

Am having some trouble, seeing this in response to my Github addon submit workflow (https://github.com/bossanova808/script.m...submit.yml):

Code:

Run xbmc/[email protected]
/usr/bin/docker run --name c42acb160fb3550ccf488fa471aa9a88fead57_a5269a --label c42acb --workdir /github/workspace --rm -e "GH_USERNAME" -e "GH_TOKEN" -e "EMAIL" -e "INPUT_KODI-REPOSITORY" -e "INPUT_KODI-VERSION" -e "INPUT_ADDON-ID" -e "INPUT_KODI-MATRIX" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/script.module.bossanova808/script.module.bossanova808":"/github/workspace" c42acb:160fb3550ccf488fa471aa9a88fead57 "repo-scripts" "matrix" "script.module.bossanova808" "false"
addon-submitter - INFO: Getting addon.xml file content
addon-submitter - INFO: Creating ZIP file...
addon-submitter - INFO: ZIP created successfully.
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11...-commands/
addon-submitter - INFO: Getting addon.xml file content
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "GET /repos/bossanova808/repo-scripts?type=all HTTP/1.1" 404 None
addon-submitter - INFO: Creating a personal fork of repo-scripts...
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "POST /repos/xbmc/repo-scripts/forks HTTP/1.1" 401 169
Traceback (most recent call last):
File "/usr/local/bin/submit-addon", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/addon_submitter/__main__.py", line 77, in main
utils.create_personal_fork(args.repo, gh_username, gh_token)
File "/usr/local/lib/python3.7/site-packages/addon_submitter/utils.py", line 202, in create_personal_fork
'GitHub API error: {}\n{}'.format(resp.status_code, resp.text)
addon_submitter.utils.AddonSubmissionError: GitHub API error: 401
{"message":"You must be logged in to do that.","documentation_url":"https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication","status":"401"}

Any ideas why it can't create the scripts repo fork?  The secret token/email are in place and as per my other repositories.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | Caber Toss | Switchback | XSqueezeDisplay | Kodi 2nd Display
Sorry, no help w/out a *full debug log*.
Reply
#5
I tried manually forking repo-scripts, but then I get a different error:

Code:

Run xbmc/[email protected]
/usr/bin/docker run --name f58546719319816a6c4b5aa0a7544798772044_db3cc6 --label f58546 --workdir /github/workspace --rm -e "GH_USERNAME" -e "GH_TOKEN" -e "EMAIL" -e "INPUT_KODI-REPOSITORY" -e "INPUT_KODI-VERSION" -e "INPUT_ADDON-ID" -e "INPUT_KODI-MATRIX" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/script.module.bossanova808/script.module.bossanova808":"/github/workspace" f58546:719319816a6c4b5aa0a7544798772044 "repo-scripts" "matrix" "script.module.bossanova808" "false"
addon-submitter - INFO: Getting addon.xml file content
addon-submitter - INFO: Creating ZIP file...
addon-submitter - INFO: ZIP created successfully.
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11...-commands/
addon-submitter - INFO: Getting addon.xml file content
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "GET /repos/bossanova808/repo-scripts?type=all HTTP/1.1" 200 None
addon-submitter - INFO: Creating addon branch "matrix"...
addon-submitter - INFO: Addon branch "matrix" created successfully.
addon-submitter - INFO: Checking pull request...
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "GET /repos/xbmc/repo-scripts/pulls?head=bossanova808%3Ascript.module.bossanova808%40matrix&base=matrix HTTP/1.1" 200 2
addon-submitter - INFO: Submitting pull request...
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "POST /repos/xbmc/repo-scripts/pulls HTTP/1.1" 404 None
addon-submitter - DEBUG: Pull request URL: https://api.github.com/repos/xbmc/repo-scripts/pulls
addon-submitter - DEBUG: Pull request payload: {'base': 'matrix',
'body': '### Add-on details:\n'
'\n'
'- **General**\n'
' - Add-on name: Bossanova808 Dependencies\n'
' - Add-on ID: script.module.bossanova808\n'
' - Version number: 1.0.0\n'
' - Kodi/repository version: matrix\n'
'\n'
'- **Code location**\n'
' - URL: https://github.com/bossanova808/script.m...anova808\n'
' \n'
'Common code needed by bossanova808 addons\n'
'\n'
'### Description of changes:\n'
'\n'
'v1.0.0 Iniial release\n'
'\n'
'### Checklist:\n'
'\n'
'- [x] My code follows the [add-on '
'rules](http://kodi.wiki/view/Add-on_rules) and [piracy '
'stance](http://kodi.wiki/view/Official:Forum_rul...acy_Policy) of '
'this project. \n'
'- [x] I have read the '
'[CONTRIBUTING](https://github.com/xbmc/repo-scripts/blo...IBUTING.md) '
'document\n'
'- [x] Each add-on submission should be a single commit with using '
'the following style: [plugin.video.foo] v1.0.0\n',
'head': 'bossanova808Confusedcript.module.bossanova808@matrix',
'maintainer_can_modify': True,
'title': '[script.module.bossanova808@matrix] 1.0.0'}
Traceback (most recent call last):
File "/usr/local/bin/submit-addon", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/addon_submitter/__main__.py", line 86, in main
args.repo, args.branch, local_branch_name, addon_info, gh_username, gh_token
File "/usr/local/lib/python3.7/site-packages/addon_submitter/utils.py", line 282, in create_pull_request
'GitHub API error: {}\n{}'.format(resp.status_code, pformat(resp.json()))
addon_submitter.utils.AddonSubmissionError: GitHub API error: 404
{'documentation_url': 'https://docs.github.com/rest/pulls/pulls#create-a-pull-request',
'message': 'Not Found',
'status': '404'}
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | Caber Toss | Switchback | XSqueezeDisplay | Kodi 2nd Display
Sorry, no help w/out a *full debug log*.
Reply
#6
I've never used the addon submitter action so cannot tell anything about it. I developed the actual addon-submitter script and use it ever since. Here's an example of my submit workflow: https://github.com/romanvm/service.addic...-addon.yml Make sure your token has necessary scopes. IIRC, you need at least repo scope.
Reply
#7
Who is the best person to ask for help with it?  I tried using a newly generated token and get a new error again (shouldn't be required as my other token is same permissions (including the repo scope) and has no expiry).

Code:

Run xbmc/[email protected]
/usr/bin/docker run --name e2e044a244ddaf24224aa6a0af77137bda4526_de2c4c --label e2e044 --workdir /github/workspace --rm -e "GH_USERNAME" -e "GH_TOKEN" -e "EMAIL" -e "INPUT_KODI-REPOSITORY" -e "INPUT_KODI-VERSION" -e "INPUT_ADDON-ID" -e "INPUT_KODI-MATRIX" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/script.module.bossanova808/script.module.bossanova808":"/github/workspace" e2e044:a244ddaf24224aa6a0af77137bda4526 "repo-scripts" "matrix" "script.module.bossanova808" "false"
addon-submitter - INFO: Getting addon.xml file content
addon-submitter - INFO: Creating ZIP file...
addon-submitter - INFO: ZIP created successfully.
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11...-commands/
addon-submitter - INFO: Getting addon.xml file content
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "GET /repos/bossanova808/repo-scripts?type=all HTTP/1.1" 200 None
addon-submitter - INFO: Creating addon branch "matrix"...
addon-submitter - INFO: Addon branch "matrix" created successfully.
addon-submitter - INFO: Checking pull request...
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "GET /repos/xbmc/repo-scripts/pulls?head=bossanova808%3Ascript.module.bossanova808%40matrix&base=matrix HTTP/1.1" 200 2
addon-submitter - INFO: Submitting pull request...
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "POST /repos/xbmc/repo-scripts/pulls HTTP/1.1" 422 201
addon-submitter - DEBUG: Pull request URL: https://api.github.com/repos/xbmc/repo-scripts/pulls
addon-submitter - DEBUG: Pull request payload: {'base': 'matrix',
'body': '### Add-on details:\n'
'\n'
'- **General**\n'
' - Add-on name: Bossanova808 Dependencies\n'
' - Add-on ID: script.module.bossanova808\n'
' - Version number: 1.0.0\n'
' - Kodi/repository version: matrix\n'
'\n'
'- **Code location**\n'
' - URL: https://github.com/bossanova808/script.m...anova808\n'
' \n'
'Common code needed by bossanova808 addons\n'
'\n'
'### Description of changes:\n'
'\n'
'v1.0.0 Iniial release\n'
'\n'
'### Checklist:\n'
'\n'
'- [x] My code follows the [add-on '
'rules](http://kodi.wiki/view/Add-on_rules) and [piracy '
'stance](http://kodi.wiki/view/Official:Forum_rul...acy_Policy) of '
'this project. \n'
'- [x] I have read the '
'[CONTRIBUTING](https://github.com/xbmc/repo-scripts/blo...IBUTING.md) '
'document\n'
'- [x] Each add-on submission should be a single commit with using '
'the following style: [plugin.video.foo] v1.0.0\n',
'head': 'bossanova808Confusedcript.module.bossanova808@matrix',
'maintainer_can_modify': True,
'title': '[script.module.bossanova808@matrix] 1.0.0'}
Traceback (most recent call last):
File "/usr/local/bin/submit-addon", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/addon_submitter/__main__.py", line 86, in main
args.repo, args.branch, local_branch_name, addon_info, gh_username, gh_token
File "/usr/local/lib/python3.7/site-packages/addon_submitter/utils.py", line 282, in create_pull_request
'GitHub API error: {}\n{}'.format(resp.status_code, pformat(resp.json()))
addon_submitter.utils.AddonSubmissionError: GitHub API error: 422
{'documentation_url': 'https://docs.github.com/rest/pulls/pulls#create-a-pull-request',
'errors': [{'code': 'invalid', 'field': 'head', 'resource': 'PullRequest'}],
'message': 'Validation Failed',
'status': '422'}
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | Caber Toss | Switchback | XSqueezeDisplay | Kodi 2nd Display
Sorry, no help w/out a *full debug log*.
Reply
#8
I tried your work-flow as well:

Code:


Run submit-addon -r repo-scripts -b matrix --pull-request script.module.bossanova808
submit-addon -r repo-scripts -b matrix --pull-request script.module.bossanova808
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
GH_USERNAME: bossanova808
GH_TOKEN: ***
EMAIL: r***
addon-submitter - INFO: Getting addon.xml file content
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "GET /repos/bossanova808/repo-scripts?type=all HTTP/11" 200 None
addon-submitter - INFO: Creating addon branch "matrix"...
addon-submitter - INFO: Addon branch "matrix" created successfully.
addon-submitter - INFO: Checking pull request...
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "GET /repos/xbmc/repo-scripts/pulls?head=bossanova808%3Ascript.module.bossanova808%40matrix&base=matrix HTTP/11" 200 2
addon-submitter - INFO: Submitting pull request...
urllib3.connectionpool - DEBUG: Starting new HTTPS connection (1): api.github.com:443
urllib3.connectionpool - DEBUG: https://api.github.com:443 "POST /repos/xbmc/repo-scripts/pulls HTTP/11" 404 None
addon-submitter - DEBUG: Pull request URL: https://api.github.com/repos/xbmc/repo-scripts/pulls
addon-submitter - DEBUG: Pull request payload: {'base': 'matrix',
'body': '### Add-on details:\n'
'\n'
'- **General**\n'
' - Add-on name: Bossanova808 Dependencies\n'
' - Add-on ID: script.module.bossanova808\n'
' - Version number: 1.0.0\n'
' - Kodi/repository version: matrix\n'
'\n'
'- **Code location**\n'
' - URL: https://github.com/bossanova808/script.m...anova808\n'
' \n'
'Common code needed by bossanova808 addons\n'
'\n'
'### Description of changes:\n'
'\n'
'v1.0.0 Iniial release\n'
'\n'
'### Checklist:\n'
'\n'
'- [x] My code follows the [add-on '
'rules](http://kodi.wiki/view/Add-on_rules) and [piracy '
'stance](http://kodi.wiki/view/Official:Forum_rul...acy_Policy) of '
'this project. \n'
'- [x] I have read the '
'[CONTRIBUTING](https://github.com/xbmc/repo-scripts/blo...IBUTING.md) '
'document\n'
'- [x] Each add-on submission should be a single commit with using '
'the following style: [plugin.video.foo] v1.0.0\n',
'head': 'bossanova808Confusedcript.module.bossanova808@matrix',
'maintainer_can_modify': True,
'title': '[script.module.bossanova808@matrix] 1.0.0'}
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.8.18/x64/bin/submit-addon", line 8, in <module>
sys.exit(main())
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/addon_submitter/__main__.py", line 85, in main
utils.create_pull_request(
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/addon_submitter/utils.py", line 282, in create_pull_request
raise AddonSubmissionError(
addon_submitter.utils.AddonSubmissionError: GitHub API error: 404
{'documentation_url': 'https://docs.github.com/rest/pulls/pulls#create-a-pull-request',
'message': 'Not Found',
'status': '404'}
Error: Process completed with exit code 1.

Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | Caber Toss | Switchback | XSqueezeDisplay | Kodi 2nd Display
Sorry, no help w/out a *full debug log*.
Reply
#9
From what I see there's a problem with creating a branch in your repo fork. It is missing from here: https://github.com/bossanova808/repo-scripts/branches so, as the error message says, "head" parameter is not valid because it points to nowhere. Unfortunately, the addon submitter script does not log command line output so it's hard to tell why creating a branch failed. I'd recommend to submit your addon manually. Meanwhile I'll think how to capture and log command line output in the submitter script so that the next time the situation will be more clear.
Reply
#10
(2024-10-09, 09:16)Roman_V_M Wrote: Meanwhile I'll think how to capture and log command line output in the submitter script so that the next time the situation will be more clear.

That would be very helpful for sure as it took a lot of tedious experimenting to zero in on the actual problem without any useful error messages.  (If you do get around to doing that -> a big thank you in advance, I am sure it will help people in future!).

I know you don't use the Team Kodi workflows yourself, but given they have become semi-standard, here is what I worked out, for the sake of my future self and others who may run into issues in this area.

I follow the advice at the workflow repos pretty much as given and have these two workflows in each of my repos:
https://github.com/xbmc/action-kodi-addon-checker
https://github.com/xbmc/action-kodi-addon-submitter

It's all a bit confusing because there are in fact two tokens used in these workflows, and they have very similar names. 

Code:

GH_TOKEN

...must be manually created in you Github user -> Settings -> Developer Settings as a Personal Access Token (classic), with repo and user permissions:

Image

Github automatically creates another repo token for you - with a very similar name, so it's east to mistake the two in the workflows if you're not looking for it:

Code:

GITHUB_TOKEN

I think there has been a Github policy change with this, as when I create a new repo, the permissions (as found in Settings -> Actions -> General) - are wrong, and this turned out to be the key:

Image

These need to be changed to:

Image

At that point, your two tokens should be in place and have all the needed permissions, and both workflows should run correctly.

Many thanks for your help and at this point I have my module and a new addon using it in the repo-scripts PR queue.  Once those are in, I will then go back through the other addons and submit new versions that use the module.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | Caber Toss | Switchback | XSqueezeDisplay | Kodi 2nd Display
Sorry, no help w/out a *full debug log*.
Reply

Logout Mark Read Team Forum Stats Members Help
Policy/thoughts on common modules?0