Commit Graph

361 Commits

Author SHA1 Message Date
sudoforge
e45c3c5ee6
refactor: rename github test repository: test-github-bridge (#1256)
This change renames references to the repository used to test the github
bridge from `git-bug-test-github-bridge` to `test-github-bridge`,
dropping the `git-bug` prefix as it is extraneous now that it is under
the `git-bug` organization.

Change-Id: I5795bd39cc3b2e81774c4d9676ae5cbabfba8f1c
2024-08-25 16:57:47 -07:00
Michael Muré
3a4b8805df
core: make label a common type, in a similar fashion as for status (#1252)
This will be useful for Board, and likely code review support later
2024-08-25 18:40:23 +00:00
sudoforge
2004fa79e6
feat: update references to the git-bug organization (#1249)
The repository was recently moved to the git-bug organization on github.
This change refactors references to the repository to ensure that they
use the updated owner URI.

Closes: #1243
Change-Id: I799712354c6ba25cdd8b06286275850c52efe6ff
2024-08-24 08:08:00 -07:00
guoguangwu
d4f6f273bc chore: remove refs to deprecated io/ioutil
Signed-off-by: guoguangwu <guoguangwug@gmail.com>

chore: remove refs to deprecated io/ioutil

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
2024-07-23 20:22:15 -07:00
dependabot[bot]
f0ab00b6c9
build(deps): bump github.com/xanzy/go-gitlab from 0.90.0 to 0.106.0 (#1167)
* build(deps): bump github.com/xanzy/go-gitlab from 0.90.0 to 0.106.0

Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.90.0 to 0.106.0.
- [Changelog](https://github.com/xanzy/go-gitlab/blob/main/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.90.0...v0.106.0)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* migrate

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2024-07-16 02:20:07 +02:00
dockercui
e256cdec58 Fix some comments
Signed-off-by: dockercui <dockercui@aliyun.com>
2024-04-24 10:47:28 +08:00
Michael Muré
a9697c7a47
CI: ignore spelling mistake in repo to be imported from github 2023-03-04 14:36:55 +01:00
Yaroslav Halchenko
1af335f913 [DATALAD RUNCMD] Run codespell -w
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
2023-01-23 10:38:55 -05:00
Henrik Buestad
119fdeefc4 added EventMentionedInCommit 2023-01-13 15:25:07 +01:00
Michael Muré
637071a84b
make go1.19 fmt happy 2023-01-11 13:28:07 +01:00
Michael Muré
0a5a0ec1ef
Merge pull request #938 from MichaelMure/cache-reorg
Generic cache layer
2022-12-23 01:48:14 +01:00
Michael Muré
9591110082
cache: fix some bugs after refactor 2022-12-23 01:41:03 +01:00
Michael Muré
108518530e
github: cleanup test token when test is done 2022-12-22 23:53:13 +01:00
Michael Muré
9b98fc0648
cache: tie up the refactor up to compiling 2022-12-21 21:54:36 +01:00
Michael Muré
0ac39a7ab5
WIP 2022-11-28 17:20:25 +01:00
Michael Muré
9abeb9956b
github: sanitize rate limit waiting time
In particular, for the case of when the local clock is wrong, but also if the returned value is bogus.
2022-11-15 20:05:04 +01:00
Michael Muré
a52c474f11
github: fix rate limiting
It seems like the error message that github return changed.
2022-11-15 19:24:16 +01:00
Michael Muré
3c6ebc2bfd core: bubble up the comment ID when created, or edited the first comment 2022-11-13 12:31:38 +01:00
Michael Muré
45b04351d8
bug: have a type for combined ids, fix https://github.com/MichaelMure/git-bug/issues/653 2022-08-22 13:25:26 +02:00
Michael Muré
8818d091e8
move bug.Status in entities/common for reuse 2022-08-20 10:52:11 +02:00
Michael Muré
5511c230b6
move {bug,identity} to /entities, move input to /commands 2022-08-18 23:44:06 +02:00
Michael Muré
3d454d9dc8
entity/dag: proper base operation for simplified implementation
- 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
2022-07-25 13:27:17 +02:00
Steve Moyer
1d4667c825
refactor(809): eliminate need to defer CleanupTestRepos() 2022-06-16 09:02:52 -04:00
Michael Muré
7348fb9edb
github: fix data race when closing event channel
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.
2022-06-05 15:13:49 +02:00
Gaël James
09037baa7c Allow new gitlab PAT format 2022-03-31 09:57:50 +02:00
Michael Muré
6f11282451 jira: fix incorrect client creation reusing the same credential 2022-03-10 18:41:54 +01:00
Michael Muré
05d73e1b53
Merge pull request #571 from 5nord/add-new-gitlab-iterator
[gitlab] Add new iterator with state change events
2022-02-01 09:24:58 +01:00
dependabot[bot]
245e61e4f1
Bump github.com/xanzy/go-gitlab from 0.50.4 to 0.54.1 (#732)
* Bump github.com/xanzy/go-gitlab from 0.50.4 to 0.54.1

Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.50.4 to 0.54.1.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.50.4...v0.54.1)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2022-01-05 13:37:15 +01:00
Michael Muré
e888391b36
gitlab: re-enable previously broken test 2021-12-05 11:19:40 +01:00
Michael Muré
e762290e23
gitlab: order events on the fly 2021-12-05 11:07:29 +01:00
Michael Muré
4ab6d91df6
Merge pull request #715 from remram44/gitlab-access-tokens
Fix GitLab access tokens settings link
2021-12-04 12:34:03 +01:00
Michael Muré
cadbccb533
Merge pull request #727 from MichaelMure/rng-dynamics/fix-import-empty-title
Fix: github import, some issue titles cause error
2021-12-04 12:29:24 +01:00
Alexander Scharinger
160ba2420b Fix: github import, some issue titles cause error 2021-12-04 09:50:24 +01:00
Alexander Scharinger
476526ac2b Fix: github bridge: push then pull without duplication 2021-12-03 23:21:11 +01:00
Remi Rampin
882579b129 Update URL of GitLab access token settings 2021-10-13 15:07:03 -04:00
Remi Rampin
f50aea486b Fix GitLab showing https:/../personal_access_token
Using path.Join() to concatenate URLs doesn't really make sense, and in
particular will change "//" to "/".
2021-10-13 15:06:47 -04:00
rng-dynamics
d546cdeee1
Tests for the github bridge (#706)
Add integration test for github bridge
2021-09-14 22:24:34 +02:00
rng-dynamics
247e1a865d
feature: Github bridge mutation rate limit (#694)
Unified handling of rate limiting of github graphql api
2021-09-14 22:22:28 +02:00
dependabot[bot]
322f0639c2
Bump github.com/xanzy/go-gitlab from 0.48.0 to 0.50.0
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.48.0 to 0.50.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.48.0...v0.50.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 10:07:56 +02:00
Sascha
1939949fcd
CLI: Add non-interactive option to interactive commands (#651)
* 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>
2021-05-09 11:14:45 +02:00
Matthias Simon
028d5c03f9 Add some documentation comments 2021-04-23 09:17:37 +02:00
Matthias Simon
aa4e225a80 gitlab: Add new iterator with state change events
Retrieving events is spread across various various Gitlab APIs. This
makes importing and sorting Gitlab events by time quite complicated.

This commit replaces the old iterators with a goroutine/channel-based
iterator, which merges the individual Gitlab API streams into a single
(sorted) event stream.
2021-04-23 09:02:48 +02:00
Michael Muré
7a7a402649
github: attempt to fix a CI issue 2021-04-23 00:28:46 +02:00
Ellis Clayton
a80152890c
Support new GitHub token formats
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/
2021-04-19 10:21:11 +10:00
Michael Muré
51a2c85954
make sure every text input is safe and validated
fix #630
2021-04-17 17:40:11 +02:00
Alexander Scharinger
8fb6ea0d95 Github brdige: move credential loading and client creation back
Reason: failing integration tests
2021-04-09 15:56:32 +02:00
Alexander Scharinger
be24cdfec4 Revert "Bridges: move credential loading and client creation"
This reverts commit 3d14e2e67c.
2021-04-09 15:41:27 +02:00
Michael Muré
10a80f1888
github: minor cleanups 2021-04-09 13:07:45 +02:00
Michael Muré
1520f678f7
Merge remote-tracking branch 'origin/master' into dev-gh-bridge 2021-04-09 13:01:14 +02:00
Alexander Scharinger
0fd570171d Improve feedback for user when Github rate limiting
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.
2021-04-08 23:57:25 +02:00