GitHub config - where would you store?

Where would you store GitHub config?

  • With the #CustomBuildAction (ie use inline arguments)

    Votes: 0 0.0%

  • Total voters
    4
  • This poll will close: .

tchart

Well-Known Member
Licensed User
Longtime User
Some of you may have seen my b4x_cba (B4X Custom Build Action) tool here;


Over the holidays, I implemented a new action to push B4X project files to a GitHub repo using an ide link or custom build action.

This is all part of b4x_cba and doesn't require any git CLI/UI etc.

More about this;

1. No, it's not git
2. It uses the GitHub REST API
3. It uses an API key (not username/login or ssh)
4. The repo and branch need to exist - you can do that in GitHub
5. It pushes only, it doesn't offer merging etc - you can do that in GitHub
6. It only pushes new or changed files

My question (before I release this) is;

Should the GitHub config (repo, branch etc) be stored in the project file (ie in Main) or a separate file in the project folder?

It currently uses config in Main as per below sample. I think this is more convenient, but some people may not like having these details in the project.

NOTE the API key is not stored with the config, it is stored in the B4X install folder (this is to avoid the key being accidentally uploaded).



Small update, after reading some posts by @aeric I have moved the ignore files/folder to a .gitignore file and also created a .gitattribute file (thanks @aeric ). These files will be auto-created in the project directory the first time the push tool is run. You can adjust these after if necessary.





With a .gitattribute file GitHub will correctly interpret your code as B4X

 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…