aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github
Commit message (Collapse)AuthorAgeFilesLines
* entity/dag: proper base operation for simplified implementationMichael Muré2022-07-253-12/+14
| | | | | | | | - reduce boilerplace necessary to implement an operation - consolidate what an operation is in the core, which in turn pave the way for a generic cache layer mechanism - avoid the previously complex unmarshalling process - support operation metadata from the core - simplified testing
* refactor(809): eliminate need to defer CleanupTestRepos()Steve Moyer2022-06-163-8/+4
|
* github: fix data race when closing event channelMichael Muré2022-06-054-151/+144
| | | | | | | | | | I believe the issue was twofold: When done importing, the calling context is likely still valid, so if the output channel is not read enough and reach capacity, some event producer down the line can be blocked trying to send in that channel. When closing it, this send is still trying to proceed, which is illegal in go. In rateLimitHandlerClient, there was a need to 2 different type of output channel: core.ExportResult and ImportEvent. To do so, the previous code was using a single channel type RateLimitingEvent and a series of goroutines to read/cast/send to the final channel. This could result in more async goroutine being stuck trying to send in an at-capacity channel. Instead, the code now use a simple synchronous callback to directly push to the final output channel. No concurrency needed anymore and the code is simpler. Any of those fixes could have resolved the data race, but both fixes is more correct.
* Merge pull request #727 from MichaelMure/rng-dynamics/fix-import-empty-titleMichael Muré2021-12-041-11/+9
|\ | | | | Fix: github import, some issue titles cause error
| * Fix: github import, some issue titles cause errorAlexander Scharinger2021-12-041-11/+9
| |
* | Fix: github bridge: push then pull without duplicationAlexander Scharinger2021-12-031-1/+1
|/
* Tests for the github bridge (#706)rng-dynamics2021-09-143-23/+461
| | | Add integration test for github bridge
* feature: Github bridge mutation rate limit (#694)rng-dynamics2021-09-147-220/+266
| | | Unified handling of rate limiting of github graphql api
* CLI: Add non-interactive option to interactive commands (#651)Sascha2021-05-091-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add option to skip the AvatarURL input request Using an empty string for the avatar cli flag e.g. `git-bug user create -a ""` will still result in a prompt. As the avatar URL is an optional option, it should be possible to skip asking for it entirely. Otherwise automated user creation via a script must make use of pipe hacks. * Add global --non-interactive cmdline option * Replace --skipAvatar for --non-interactive option * Cmd BugAdd: respect non-interactive option * Cmd bridge configure: respect non-interactive opt * Cmd CommentAdd: respect non-interactive option * Cmd CommentEdit: respect non-interactive option * Cmd TermUI: respect non-interactive option * Cmd TitleEdit: respect non-interactive option * Remove global non-interactive option * Cmd UserCreate: Use local non-interactive option * Cmd BugAdd: Use local non-interactive option * Cmd BridgeConfigure: Use local non-interactive option * Cmd CommentAdd: Use local non-interactive option * Cmd CommentEdit: Use local non-interactive option * Cmd TermUI: Drop non-interactive option It should be obviouse that the termui is an interactive command. * Cmd TitleEdit: Use local non-interactive option * Update docs * Bridge GitHub: respect non-interactive option * Bridge GitLab: respect non-interactive option * Bridge Jira: respect non-interactive and token opt * Fix failing compilation * Bridge launchpad: respect non-interactive option * bridge: isNonInteractive --> interactive Co-authored-by: Michael Muré <batolettre@gmail.com>
* github: attempt to fix a CI issueMichael Muré2021-04-231-0/+4
|
* Support new GitHub token formatsEllis Clayton2021-04-191-2/+3
| | | | | | | | | GitHub have introduced a new format for their access tokens, which does not fit within the rules of the previous regex. For the time being, the previous token format is still being supported by GitHub, so it makes sense to continue allowing legacy tokens. https://github.blog/changelog/2021-03-04-authentication-token-format-updates/
* make sure every text input is safe and validatedMichael Muré2021-04-171-20/+7
| | | | fix #630
* Github brdige: move credential loading and client creation backAlexander Scharinger2021-04-091-12/+16
| | | | Reason: failing integration tests
* github: minor cleanupsMichael Muré2021-04-095-22/+25
|
* Merge remote-tracking branch 'origin/master' into dev-gh-bridgeMichael Muré2021-04-094-36/+33
|\
| * bug: migrate to the DAG entity structure!Michael Muré2021-02-142-17/+12
| |
| * identity: PR fixesMichael Muré2021-02-142-2/+2
| |
| * deal with the previous changesMichael Muré2021-02-142-32/+34
| |
* | Improve feedback for user when Github rate limitingAlexander Scharinger2021-04-082-9/+9
| | | | | | | | | | | | | | | | The Github bridge itself should not write anything. This commit removes code writing to stdout and itroduces an event `ImportEventRateLimiting` to `core.ImportResult` in order to inform about a rate limiting situation of the Github GraphQL API. Now the communication with the user is delegated to the various user interfaces.
* | Add comment to clarify look ahead in import channelAlexander Scharinger2021-04-081-1/+10
| |
* | Github bridge: refactor message handlingAlexander Scharinger2021-03-281-3/+15
| |
* | Github bridge: stop sleep-timer on SIGINTAlexander Scharinger2021-03-271-2/+8
| |
* | Github bridge: fix message about timeoutAlexander Scharinger2021-03-271-1/+2
| |
* | Github bridge: RefactorAlexander Scharinger2021-03-223-435/+303
| |
* | Github bridge: send message to user when waitingAlexander Scharinger2021-03-182-63/+209
| | | | | | | | | | | | When the Github GraphQL API rate limit is exhausted print a message at the bottom of the terminal so the user knows why the import has been paused.
* | Github bridge: try again in case of web API errorAlexander Scharinger2021-03-151-1/+23
| |
* | Remove maps containing channels.Alexander Scharinger2021-03-152-93/+62
| | | | | | | | | | | | | | | | | | The old implementation of the github bridge used maps to store several channels holding data obtained from the Github API. Removing the maps and simply packing data and channels together in a struct and passing it through one single channel makes the program simpler in terms of concurrency and, additionally, enables the garbage collector to free the memory gradually without any additional provisions.
* | Fix errors: deadlock and empty titlesAlexander Scharinger2021-03-153-203/+263
| |
* | Deal with github bridge import rate limitAlexander Scharinger2021-02-284-737/+687
|/
* Merge pull request #534 from MichaelMure/gh-bridge-pull-fixMichael Muré2021-02-013-419/+345
|\ | | | | Fix github bridge import
| * Add commentsAlexander Scharinger2021-01-281-9/+41
| |
| * Fix bugAlexander Scharinger2021-01-261-1/+1
| |
| * Integrate new Github Bridge importAlexander Scharinger2021-01-243-812/+246
| |
| * Add GraphQL github-bridge query for comment editsAlexander Scharinger2021-01-242-1/+92
| |
| * Add GraphQL github timeline query and iteratorAlexander Scharinger2021-01-242-3/+115
| |
| * Add issue edit iteratorAlexander Scharinger2021-01-242-13/+97
| |
| * Add issue iteratorAlexander Scharinger2021-01-241-0/+90
| |
| * Add GraphQL github issue queryAlexander Scharinger2021-01-242-0/+40
| |
| * WIP: Pinpoint some of the reasons for bug #385Alexander Scharinger2020-12-122-5/+48
| | | | | | | | | | | | | | | | | | Work in progress. The github bridge contains a bug documented in issue #385. This commit shows what is the problem. There might be more problems. I have changed the GraphQL query for timeline items and there are much less wrong imports now. (Are there any malformed imports left?) I would like to rework the entire bridge/github/iterator in the near future in order to create a reliable fix for this bug.
* | add github actionsMichael Muré2020-12-081-0/+3
|/
* github: minor cleanupsMichael Muré2020-11-221-12/+26
|
* Change return type from map to structAlexander Scharinger2020-11-181-13/+18
|
* Apply suggestions from code reviewrng-dynamics2020-11-181-2/+2
| | | Co-authored-by: Michael Muré <batolettre@gmail.com>
* Revision of Github bridge device authorization grantAlexander Scharinger2020-11-181-59/+72
|
* Replace Github authorization endpoint by device authorization grantAlexander Scharinger2020-11-181-100/+94
| | | | Fix issue #484
* repo: use go-git in more places, fix pushMichael Muré2020-10-042-3/+3
|
* bridge: store credentials in the Keyring instead of the git configMichael Muré2020-09-291-1/+1
|
* repository: remove tie to Bug, improved and reusable testingMichael Muré2020-06-262-3/+3
| | | | | | | | | - allow the creation of arbitrary Lamport clocks, freeing the way to new entities and removing Bug specific (upper layer) code. - generalize the memory-only and persisted Lamport clocks behind a common interface - rework the tests to provide reusable testing code for a Repo, a Clock, a Config, opening a path to add a new Repo implementation more easily - test previously untested components with those new tests Note: one problem found during this endeavor is that `identity.Version` also need to store one time + Lamport time for each other Entity (Bug, config, PR ...). This could possibly done without breaking change but it would be much easier to wait for https://github.com/MichaelMure/git-bug-migration to happen.
* bug: harmonize how time are used, fix some issues in command special formatsMichael Muré2020-06-251-1/+1
| | | | This assume that the convertion from time.Time <--> Unix timestamp is lossless which seems to be.
* github: tighten the import matchingMichael Muré2020-03-281-1/+4
|