Code Monkey home page Code Monkey logo

wetransfer / gitbuddy Goto Github PK

View Code? Open in Web Editor NEW
242.0 12.0 17.0 429 KB

Your buddy in managing and maintaining GitHub repositories, and releases. Automatically generate changelogs from issues and merged pull-requests.

Home Page: https://www.wetransfer.com

License: Other

Swift 99.71% Ruby 0.29%
changelog-generator release-automation release-management swift swift-package-manager command-line-tool wt-branch-protection-exempt wt-branch-protection-two-approvals

gitbuddy's People

Contributors

amirdew avatar avdlee avatar basthomas avatar isapozhnik avatar kairadiagne avatar maxdesiatov avatar mosamer avatar peagasilva avatar wetransferplatform avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitbuddy's Issues

Create the initial Changelog Producer

Plan du campagne

  • Fetch PRs that are merged between two branches, e.g. master & develop
  • Get the fixed issue from the PR description
  • Use either the fixed issue title or the PR title in the changelog
  • Return the generated changelog

What is this not going to do (yet)?

  • It's not creating a new Github release
  • It's not appending the generated changelog to a Changelog.md

Any references we can take as inspiration/base?

Yes, definitely. Fastlane is doing something similar on their repository here:

https://github.com/fastlane/fastlane/blob/master/fastlane/Fastfile#L326

Support "Keep a Changelog" standard

Keep a Changelog is a great standard that is also automatically parseable by different GitHub Actions. It would be great if GitBuddy supported formatting its output in accordance with the standard. That would improve the interoperability with other release automation tools.

Failed to install with Mint

I try to install the tool with Mint

mint install WeTransfer/GitBuddy                                                                                                                                               
๐ŸŒฑ Finding latest version of GitBuddy
๐ŸŒฑ Cloning GitBuddy 3.1.0
๐ŸŒฑ Resolving package
๐ŸŒฑ Building package
[1/3] Compiling RequestKit JSONPostRouter.swift
[2/4] Compiling OctoKit Configuration.swift
[3/4] Compiling ArgumentParser BashCompletionsGenerator.swift
[4/5] Compiling GitBuddyCore ChangelogBuilder.swift
/private/var/folders/19/7wgrl0ln4nn1zzkclttgsy840000gn/T/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/IssuesFetcher.swift:23:102: error: type 'Openness' has no member 'Closed'
        octoKit.issues(session, owner: project.organisation, repository: project.repository, state: .Closed) { (response) in
                                                                                                    ~^~~~~~
/private/var/folders/19/7wgrl0ln4nn1zzkclttgsy840000gn/T/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/PullRequestFetcher.swift:26:126: error: type 'Openness' has no member 'Closed'
        octoKit.pullRequests(session, owner: project.organisation, repository: project.repository, base: baseBranch, state: .Closed, sort: .updated, direction: .desc) { (response) in
                                                                                                                            ~^~~~~~
๐ŸŒฑ Encountered error during "swift build -c release -Xswiftc -target -Xswiftc arm64-apple-macosx11.2". Use --verbose to see full output
๐ŸŒฑ  Failed to build GitBuddy 3.1.0 with SPM

I'm on Apple Silicon

Installation with Homebrew

Hello and thanks for this great tool!

It would be great if GitBuddy could be installed via Homebrew, which would be one of the easiest ways to install it on macOS. I know it can be installed with Mint, but for machines that don't have Mint installed, this is a two step process, which is less than ideal. There is also a use case for installing GitBuddy on CI as a part of build process triggered on a new Git tag, where one would expect the build process to finish as quickly as possible, which is much easier to achieve with Homebrew than with Mint.

Error on installing the package

To be in a clean environment, I try to install GitBuddy in a Docker image with

FROM ubuntu:22.04

RUN apt-get update
RUN apt-get --yes install build-essential git curl
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
ENV PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
RUN brew --version && \
    /home/linuxbrew/.linuxbrew/bin/brew install mint
RUN mint --version && \
 mint install WeTransfer/GitBuddy

But I get the following error

=> ERROR [6/6] RUN mint --version &&  mint install WeTransfer/GitBuddy                                                          47.7s 
------                                                                                                                                 
 > [6/6] RUN mint --version &&  mint install WeTransfer/GitBuddy:                                                                      
#9 0.465 Version: 0.17.4                                                                                                               
#9 0.479 ๐ŸŒฑ Finding latest version of GitBuddy                                                                                         
#9 0.935 ๐ŸŒฑ Cloning GitBuddy 4.1.4                                                                                                     
#9 1.789 ๐ŸŒฑ Resolving package                                                                                                          
#9 18.69 ๐ŸŒฑ Building package
#9 47.31 Building for production...
#9 47.31 remark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimization[1/3] Compiling ArgumentParserToolInfo ToolInfo.swift
#9 47.31 remark: Incremental compilation has been disabled: it is not compatible with whole module optimization[3/5] Compiling RequestKit JSONPostRouter.swift
#9 47.31 remark: Incremental compilation has been disabled: it is not compatible with whole module optimization[5/7] Compiling OctoKit Configuration.swift
#9 47.31 [7/8] Compiling ArgumentParser BashCompletionsGenerator.swift
#9 47.31 remark: Incremental compilation has been disabled: it is not compatible with whole module optimization[9/10] Compiling GitBuddyCore ChangelogBuilder.swift
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Changelog/ChangelogItemsFactory.swift:17:31: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
#9 47.31     func items(using session: URLSession = URLSession.shared) -> [ChangelogItem] {
#9 47.31                               ^~~~~~~~~~
#9 47.31 Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
#9 47.31 public typealias URLSession = AnyObject
#9 47.31                  ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Changelog/ChangelogItemsFactory.swift:17:55: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
#9 47.31     func items(using session: URLSession = URLSession.shared) -> [ChangelogItem] {
#9 47.31                                            ~~~~~~~~~~ ^~~~~~
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/Commenter.swift:32:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
#9 47.31     static var urlSession: URLSession { URLSessionInjector.urlSession }
#9 47.31                            ^~~~~~~~~~
#9 47.31 Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
#9 47.31 public typealias URLSession = AnyObject
#9 47.31                  ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/Commenter.swift:49:27: error: argument type 'URLSession' (aka 'AnyObject') does not conform to expected type 'RequestKitURLSession'
#9 47.31             .commentIssue(urlSession, owner: project.organisation, repository: project.repository, number: issueID,
#9 47.31                           ^
#9 47.31                                      as! RequestKitURLSession
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/IssuesFetcher.swift:16:77: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
#9 47.31     func fetchAllBetween(_ fromDate: Date, and toDate: Date, using session: URLSession = URLSession.shared) throws -> [Issue] {
#9 47.31                                                                             ^~~~~~~~~~
#9 47.31 Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
#9 47.31 public typealias URLSession = AnyObject
#9 47.31                  ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/IssuesFetcher.swift:16:101: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
#9 47.31     func fetchAllBetween(_ fromDate: Date, and toDate: Date, using session: URLSession = URLSession.shared) throws -> [Issue] {
#9 47.31                                                                                          ~~~~~~~~~~ ^~~~~~
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/IssuesFetcher.swift:22:24: error: argument type 'URLSession' (aka 'AnyObject') does not conform to expected type 'RequestKitURLSession'
#9 47.31         octoKit.issues(session, owner: project.organisation, repository: project.repository, state: .closed) { response in
#9 47.31                        ^
#9 47.31                                as! RequestKitURLSession
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/IssuesResolver.swift:17:33: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
#9 47.31     func resolve(using session: URLSession = URLSession.shared) -> [Issue]? {
#9 47.31                                 ^~~~~~~~~~
#9 47.31 Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
#9 47.31 public typealias URLSession = AnyObject
#9 47.31                  ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/IssuesResolver.swift:17:57: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
#9 47.31     func resolve(using session: URLSession = URLSession.shared) -> [Issue]? {
#9 47.31                                              ~~~~~~~~~~ ^~~~~~
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/IssuesResolver.swift:24:65: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
#9 47.31     private func issues(for issueNumbers: [Int], using session: URLSession) -> [Issue] {
#9 47.31                                                                 ^~~~~~~~~~
#9 47.31 Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
#9 47.31 public typealias URLSession = AnyObject
#9 47.31                  ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/IssuesResolver.swift:29:27: error: argument type 'URLSession' (aka 'AnyObject') does not conform to expected type 'RequestKitURLSession'
#9 47.31             octoKit.issue(session, owner: project.organisation, repository: project.repository, number: issueNumber) { response in
#9 47.31                           ^
#9 47.31                                   as! RequestKitURLSession
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/OctoKit+Authentication.swift:19:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
#9 47.31         let configuration = URLSessionConfiguration.default
#9 47.31                             ~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/OctoKit+Authentication.swift:22:41: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
#9 47.31         URLSessionInjector.urlSession = URLSession(configuration: configuration, delegate: nil, delegateQueue: nil)
#9 47.31                                         ^~~~~~~~~~
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/OctoKit+Authentication.swift:22:92: error: 'nil' requires a contextual type
#9 47.31         URLSessionInjector.urlSession = URLSession(configuration: configuration, delegate: nil, delegateQueue: nil)
#9 47.31                                                                                            ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/OctoKit+Authentication.swift:22:112: error: 'nil' requires a contextual type
#9 47.31         URLSessionInjector.urlSession = URLSession(configuration: configuration, delegate: nil, delegateQueue: nil)
#9 47.31                                                                                                                ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/PullRequestFetcher.swift:19:77: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
#9 47.31     func fetchAllBetween(_ fromDate: Date, and toDate: Date, using session: URLSession = URLSession.shared) throws -> [PullRequest] {
#9 47.31                                                                             ^~~~~~~~~~
#9 47.31 Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
#9 47.31 public typealias URLSession = AnyObject
#9 47.31                  ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/PullRequestFetcher.swift:19:101: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
#9 47.31     func fetchAllBetween(_ fromDate: Date, and toDate: Date, using session: URLSession = URLSession.shared) throws -> [PullRequest] {
#9 47.31                                                                                          ~~~~~~~~~~ ^~~~~~
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/GitHub/PullRequestFetcher.swift:26:13: error: argument type 'URLSession' (aka 'AnyObject') does not conform to expected type 'RequestKitURLSession'
#9 47.31             session,
#9 47.31             ^
#9 47.31                     as! RequestKitURLSession
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Helpers/DependencyInjectors.swift:15:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
#9 47.31     var urlSession: URLSession { return URLSessionInjector.urlSession }
#9 47.31                     ^~~~~~~~~~
#9 47.31 Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
#9 47.31 public typealias URLSession = AnyObject
#9 47.31                  ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Helpers/DependencyInjectors.swift:20:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
#9 47.31     static var urlSession: URLSession!
#9 47.31                            ^~~~~~~~~~
#9 47.31 Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
#9 47.31 public typealias URLSession = AnyObject
#9 47.31                  ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Helpers/Shell.swift:39:9: warning: 'launchPath' is deprecated: renamed to 'executableURL'
#9 47.31         launchPath = "/bin/bash"
#9 47.31         ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Helpers/Shell.swift:39:9: note: use 'executableURL' instead
#9 47.31         launchPath = "/bin/bash"
#9 47.31         ^~~~~~~~~~
#9 47.31         executableURL
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Helpers/Shell.swift:44:9: warning: 'launch()' is deprecated: renamed to 'run'
#9 47.31         launch()
#9 47.31         ^
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Helpers/Shell.swift:44:9: note: use 'run' instead
#9 47.31         launch()
#9 47.31         ^~~~~~
#9 47.31         run
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Release/ReleaseProducer.swift:196:13: error: argument type 'URLSession' (aka 'AnyObject') does not conform to expected type 'RequestKitURLSession'
#9 47.31             urlSession,
#9 47.31             ^
#9 47.31                        as! RequestKitURLSession
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Tag Deletions/TagsDeleter.swift:41:30: error: argument type 'URLSession' (aka 'AnyObject') does not conform to expected type 'RequestKitURLSession'
#9 47.31         octoKit.listReleases(urlSession, owner: project.organisation, repository: project.repository, perPage: 100) { response in
#9 47.31                              ^
#9 47.31                                         as! RequestKitURLSession
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Tag Deletions/TagsDeleter.swift:74:35: error: argument type 'URLSession' (aka 'AnyObject') does not conform to expected type 'RequestKitURLSession'
#9 47.31             octoKit.deleteRelease(urlSession, owner: project.organisation, repository: project.repository, releaseId: release.id) { error in
#9 47.31                                   ^
#9 47.31                                              as! RequestKitURLSession
#9 47.31 /tmp/mint/github.com_WeTransfer_GitBuddy/Sources/GitBuddyCore/Tag Deletions/TagsDeleter.swift:106:17: error: argument type 'URLSession' (aka 'AnyObject') does not conform to expected type 'RequestKitURLSession'
#9 47.31                 urlSession,
#9 47.31                 ^
#9 47.31                            as! RequestKitURLSession
#9 47.31 ๐ŸŒฑ Encountered error during "swift build -c release --product GitBuddy". Use --verbose to see full output
#9 47.31 ๐ŸŒฑ  Failed to build GitBuddy 4.1.4 with SPM
------
executor failed running [/bin/sh -c mint --version &&  mint install WeTransfer/GitBuddy]: exit code: 1

Did I do something wrong?

Add a --version argument

To show the current version that's being used

The standard --version option should direct the program to print information about its name, version, origin and legal status, all on standard output, and then exit successfully.

Conforming to GNU Emacs 19.30

Error with swift 5.4?

Hello,

Before 5.4 it's ok.
Now I try to use Gitbuddy with swift 5.4 I got trace trap

[1] 29091 trace trap

I try to rebuild from source and run this

swift run --package-path /Volumes/perso/GitBuddy/ GitBuddy changelog -s 1.1.1

And got

Swift/ContiguousArrayBuffer.swift:580: Fatal error: Index out of range
[1]    29091 trace trap  swift run --package-path /Volumes/perso/GitBuddy/ GitBuddy changelog -s 1.1.1

Changelog includes changes that are not in the build

See this release as an example.

We should compare the dates of the tag we're releasing and the previously released tag instead of using the date of today.

Lets see if this is something we can fix within GitBuddy or whether it's something to fix within the Collect app itself.

GitBuddy hangs when no SSH passphrase was provided to git

In repositories with SSH authentication GitBuddy hangs at the "Fetching tags" stage. It attempts to run git fetch --tags origin --no-recurse-submodules -q, but this command requires an SSH key passphrase from the standard input stream to proceed for some remotes. Since GitBuddy doesn't provide it, the whole GitBuddy process hangs with no visible feedback.

Add support for tags containing a "v"

$ gitbuddy --version
HL GitBuddy 2.1.1
Copyright ยฉ 2020 WeTransfer. All rights reserved.
This Hippocratic License (HL) is an Ethical Source license (https://ethicalsource.dev) derived from the MIT License.
It's amended to limit the impact of the unethical use of open source software.

$ gitbuddy changelog --since-tag v1.17.0 --verbose
Token is lingxiankong:6c408...
Tag v1.17.0 is created at 2019-12-11 03:20:05 +0530
Getting all changes between 2019-12-10 21:51:05 +0000 and 2020-02-26 07:27:55 +0000
Segmentation fault: 11

Please let me know if other information is needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.