Commit Graph

7800 Commits

Author SHA1 Message Date
Kiril Videlov
88da873128
Merge pull request #4184 from gitbutlerapp/bundle-as-RPM
make RPM bundles
2024-07-02 15:54:42 +02:00
Caleb Owens
6d2b41e481
Merge pull request #4192 from gitbutlerapp/ndom91/create-gitbutler-ui-package
feat: create separate component library subpackage
2024-07-02 15:47:13 +02:00
Caleb Owens
ac4f3b926c
Merge remote-tracking branch 'origin/master' into ndom91/create-gitbutler-ui-package 2024-07-02 15:31:00 +02:00
Kiril Videlov
ab941cb31f
Merge pull request #4219 from gitbutlerapp/bump-tauri-minor-version
bump tauri minor version
2024-07-02 15:28:39 +02:00
Caleb Owens
ee8f871005
Correctly add package as a dependency for linting 2024-07-02 15:18:37 +02:00
Kiril Videlov
1ac47405fc
fix clippy warning about missing crossbeam feature 2024-07-02 15:14:40 +02:00
Kiril Videlov
6e8e6b7b9b
remote unneccesary borrow 2024-07-02 15:11:28 +02:00
Kiril Videlov
23503afd25
merge stuff 2024-07-02 15:05:56 +02:00
Caleb Owens
5e463f7011
Fix linting setup; eslint and prettier are global to all the packages 2024-07-02 15:00:59 +02:00
Caleb Owens
27855bf871
Don't allow importing between packages 2024-07-02 15:00:47 +02:00
Caleb Owens
6bb57466e8
Update to non-relative imports 2024-07-02 14:47:27 +02:00
Sebastian Thiel
7e6e854d5e
Merge pull request #4165 from Byron/secrets-in-keyring
migrate plain-text secrets to keystore
2024-07-02 13:33:06 +02:00
Sebastian Thiel
b8da62c68b
assure SecretServices functions
- inject secretService so it works when used directly
- remove console logs
- only remove a migrated secret (instead of removing it unconditionally)
- in +template, await for good measure, which explains why the parent function is async

In the backend:
- prevent concurrency in method that stores secrets from the frontend
  as it's racy otherwise to type a secret quickly.
2024-07-02 13:17:45 +02:00
Mattias Granlund
7f618fd248
Extract separate service for secrets
- add `buildContext` for getting/setting contexts by types
- config -> secret migration attempted if secret not found
2024-07-02 13:17:44 +02:00
Caleb Owens
6f0e3dca39
Updated broken imports 2024-07-02 13:16:26 +02:00
Caleb Owens
44e56ac370
Use turbo for production builds 2024-07-02 13:15:26 +02:00
ndom91
e8f5808589
fix: add turbo 'lint' task 2024-07-02 10:23:54 +02:00
Kiril Videlov
25aceb2520
rm unnecessary borrows 2024-07-02 11:22:08 +03:00
Kiril Videlov
a240a16cc5
silence clippy for now 2024-07-02 11:18:41 +03:00
Nico Domino
4fab3ec200
Merge branch 'master' into ndom91/create-gitbutler-ui-package 2024-07-02 10:04:46 +02:00
Sebastian Thiel
05506f49fa
migrate AI tokens from the git-configuration to the keystore.
All AI related options are stored in the user-level git configuration
file. Upon first access, they will be removed from there and placed
into the keystore as part of the migration.

The UI is provided with functions to store and save secrets which it
will use specifically to interact with these keys.

It's explicitly out of scope to *not* show the keys in plain-text
anymore after entering them.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
de00e4f049
support global secrets (without namespace for build types) and provide commands in tauri crate
That way globals secrets can be used from the UI directly.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
b08a9e8cb1
Prevent MacOS popups each startup on MacOS
MacOS is the only known platform that exhibits this behaviour - if an app
is recompiled, the hash of the binary is used to identify it towards the keychain.
As this changes each time, the keychain will ask for permission, which is fair.

However, it's also an impediment which leads to the implementation of
a keystore that uses git credentials as backend. For this to work,
the latest version of `gitoxide` is required for now.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
7e7555567b
automatically delete empty passwords from the key store
The frontend uses this to invalidate the GitHub token, even though
it can also deal with `null`. Let's keep the keystore clean and
only keep entries that contain an actual password.

Note that the consumers, i.e. the frontend, handle an empty password
for the short time it's in memory.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
9da051b089
improve naming of tokens stored in the keychain: do not 'abuse' user field
Currently, the user is used as handle name, but instead, just name it
`GitButler`.
2024-07-02 10:02:46 +02:00
Sebastian Thiel
fbfeba0637
auto-delete a user if its access token can't be found 2024-07-02 10:02:46 +02:00
Sebastian Thiel
ee5ff95649
Assure Sensitive fields can't be serialized
This does not only mean that they cannot be written to disk, but also
that extra work has to be done to serialize them over the wire.

This is very much by design, as they can be in structs that are
seemingly serializable and contain sensitive data, but they must
never actually be serialized.

For use in the UI, an extra type must be used that marks the secret
differently, for instance by field name.
2024-07-02 10:02:45 +02:00
Sebastian Thiel
bc8f3b74c7
tauri specializes the secret-store depending on application type
That way, there is no overlap in the technically global store, just
like before when secrets were stored in plain text.
2024-07-02 10:02:45 +02:00
Sebastian Thiel
929eb52224
auto-migrate secrets from user.json to their location in the keyring
This will also remove them from their plain-text location.

Further, when the secrets are required they will be obtained
specifically, instead of always having them at hand.

The frontend doesn't ever show these, but needs them, and
it now asks for them when it needs them.
2024-07-02 10:02:43 +02:00
Sebastian Thiel
f3e6c7ba94
Add the capability to store and retrieve secrets
This is a global facility without any state, and provides a simplified
interface to the `keyring` crate.
2024-07-02 10:01:44 +02:00
Sebastian Thiel
cedb893ad6
put 'core::serde' into its own module file
It started small, but now is large enough to warrant that.
2024-07-02 10:01:44 +02:00
Kiril Videlov
4db2698cda
bump tauri minor version
this allows us to bundle RPM packages!
2024-07-02 10:48:47 +03:00
Caleb Owens
4d29cd0723
Get things working a little tiny bit more 2024-07-01 21:09:10 +02:00
Kiril Videlov
18006a9f2a
Merge pull request #4212 from gitbutlerapp/dependabot/cargo/tauri-plugin-log-862c42a 2024-07-01 19:05:22 +02:00
Kiril Videlov
abae97fea0
Merge pull request #4213 from gitbutlerapp/dependabot/cargo/tauri-plugin-single-instance-862c42a 2024-07-01 19:05:06 +02:00
Kiril Videlov
dbba13f16b
Merge pull request #4214 from gitbutlerapp/dependabot/cargo/tauri-plugin-store-862c42a 2024-07-01 19:04:55 +02:00
Kiril Videlov
8a46a6c496
Merge pull request #4215 from gitbutlerapp/dependabot/cargo/tauri-plugin-window-state-862c42a 2024-07-01 19:04:47 +02:00
ndom91
b1b390ce72
fix: ui export map 2024-07-01 18:58:40 +02:00
ndom91
74383ba239
fix: prettier 2024-07-01 18:48:22 +02:00
ndom91
b46c2c4d5b
feat: add initial turbo cli 2024-07-01 18:47:43 +02:00
dependabot[bot]
34673ef938
Bump tauri-plugin-window-state from 5e3900e to 862c42a
Bumps [tauri-plugin-window-state](https://github.com/tauri-apps/plugins-workspace) from `5e3900e` to `862c42a`.
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](5e3900e682...862c42a457)

---
updated-dependencies:
- dependency-name: tauri-plugin-window-state
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 15:42:06 +00:00
dependabot[bot]
b60e5a2714
Bump tauri-plugin-store from 5e3900e to 862c42a
Bumps [tauri-plugin-store](https://github.com/tauri-apps/plugins-workspace) from `5e3900e` to `862c42a`.
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](5e3900e682...862c42a457)

---
updated-dependencies:
- dependency-name: tauri-plugin-store
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 15:41:06 +00:00
dependabot[bot]
523bfa5160
Bump tauri-plugin-single-instance from 5e3900e to 862c42a
Bumps [tauri-plugin-single-instance](https://github.com/tauri-apps/plugins-workspace) from `5e3900e` to `862c42a`.
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](5e3900e682...862c42a457)

---
updated-dependencies:
- dependency-name: tauri-plugin-single-instance
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 15:40:13 +00:00
dependabot[bot]
f001fc819b
Bump tauri-plugin-log from 5e3900e to 862c42a
Bumps [tauri-plugin-log](https://github.com/tauri-apps/plugins-workspace) from `5e3900e` to `862c42a`.
- [Release notes](https://github.com/tauri-apps/plugins-workspace/releases)
- [Commits](5e3900e682...862c42a457)

---
updated-dependencies:
- dependency-name: tauri-plugin-log
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 15:37:54 +00:00
Caleb Owens
82c3987d45
Unapply to real branches (#4025)
* Don't return optional

* Rename get_integration_commiter

* Add a header to wip commit

* Stuff

* Unapply all branches

* Reorder code

* Fix one test

* Name resolution

* Fix two tests

* Fix another!

* wip

* Fix so many tests

* Fix unapply.rs tests

* Fix selected for changes tests

* Move unapplying logic to delete_branch method

* Remove unused and kinda borked cherry_commit code

* Fix the tests!!!!!

* Make apply_branch private

* Change handling of headers

* Improve order integrity

* Updated types and comments to convey more meaning
2024-07-01 14:13:52 +00:00
ndom91
b8e51eeeee
fix: ui export map 2024-07-01 13:53:05 +02:00
Nico Domino
9aac60b1e4
fix: add Sentry RewriteFrames integration (#4210) 2024-07-01 13:38:15 +02:00
ndom91
911c2230c9
fix: fix test import paths 2024-07-01 13:37:52 +02:00
ndom91
cdc4359003
fix: prettier ui/package.json 2024-07-01 13:34:20 +02:00
ndom91
f0ae83fda5
fix: move CommitLines dir and update export map 2024-07-01 13:04:47 +02:00