GitCommitInfoPlugin
Access info about commit directly from Swift code
Install / Use
/learn @PGSSoft/GitCommitInfoPluginREADME
GitCommitInfoPlugin

GitCommitInfoPlugin is a simple to use Swift package build plugin that allows you to display basic information from the last git commit. You can use it to prepare info view about current commit for QA team or prepare what's new view based on the commit message.
Requirements
Xcode 14 or above
Usage
- Add dependency
File -> Add Package Dependenciesenter url to github repo. - Add Plugin to your target in section
Build Phases -> Run Build Tool Plug-ins
- Access properties from
GitCommitInfoin your view.
import SwiftUI
struct ContentView: View {
var body: some View {
NavigationStack {
List {
VStack(alignment: .leading) {
Text("Commit hash").font(.caption)
Text(GitCommitInfo.commitHash)
}
VStack(alignment: .leading) {
Text("Branch name").font(.caption)
Text(GitCommitInfo.branchName)
}
VStack(alignment: .leading) {
Text("Short commit hash").font(.caption)
Text(GitCommitInfo.shortCommitHash)
}
VStack(alignment: .leading) {
Text("Commit message").font(.caption)
Text(GitCommitInfo.commitSubject)
}
VStack(alignment: .leading) {
Text("Timestamp").font(.caption)
Text("\(GitCommitInfo.unixTimestamp)")
}
}.navigationTitle("About")
}
}
}
License
MIT
Related Skills
node-connect
341.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
