Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 7 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,14 @@
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ main ]
schedule:
- cron: '18 0 * * 1'

Expand All @@ -33,38 +27,22 @@ jobs:
fail-fast: false
matrix:
language: [ 'ruby' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
# Learn more about CodeQL language support at
# https://docs.github.com/en/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
6 changes: 3 additions & 3 deletions .github/workflows/multi-ruby-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ on:
jobs:
test:
strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
ruby: ['2.7.5', '3.0.3', '3.1.0 ']
ruby: [ '3.3', '3.4', '3.5' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0
3.3.6
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in git-commander.gemspec
gemspec

# Used by spec fixtures; a bundled gem (no longer a default gem) as of Ruby 3.5
gem "ostruct", group: :test
73 changes: 52 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,71 @@ PATH
remote: .
specs:
git-commander (0.1.0)
bundler (~> 2.1, >= 1.10.0)
bundler (>= 2.1)
logger

GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.5.0)
psych (4.0.3)
date (3.5.1)
diff-lcs (1.6.2)
erb (6.0.4)
logger (1.7.0)
ostruct (0.6.3)
psych (5.4.0)
date
stringio
rake (12.3.3)
rdoc (6.4.0)
rake (13.4.2)
rdoc (6.17.0)
erb
psych (>= 4.0.0)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
tsort
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.8)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
stringio (3.0.1)
rspec-support (~> 3.13.0)
rspec-support (3.13.7)
stringio (3.2.0)
tsort (0.2.0)

PLATFORMS
arm64-darwin
ruby
x86_64-darwin
x86_64-linux

DEPENDENCIES
git-commander!
rake (~> 12.3)
rdoc (~> 6.2)
rspec (< 4.0)
ostruct
rake (~> 13.0)
rdoc (~> 6.5)
rspec (~> 3.12)

CHECKSUMS
date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
erb (6.0.4) sha256=38e3803694be357fe2bfe312487c74beaf9fb4e5beb3e22498952fe1645b95d9
git-commander (0.1.0)
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
psych (5.4.0) sha256=14f72d69a611af663d7d70e4a7b67d9eb1f3ae9f8d916b478961d5a0075ba5b7
rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
rdoc (6.17.0) sha256=0f50d4e568fc98195f9bb155a9e8dff6c7feabfb515fb22ef6df1d12ad5a02b7
rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f

BUNDLED WITH
2.1.0
4.0.9
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,26 +142,21 @@ end
plugin :prompt

command :setup do |cmd|
cmd.summary "Connects to GitHub, creates an access token, and stores it in the git-cmd section of your git config"
cmd.summary "Connects to GitHub using a personal access token and verifies the credentials"

cmd.on_run do
gh_user = prompt.ask("Please enter your GitHub username", required: true)
gh_password = promt.mask("Please enter your GitHub password (this is NOT stored): ", required: true)
gh_token = prompt.mask(
"Please enter a GitHub personal access token (https://github.com/settings/tokens): ",
required: true
)

github.login = gh_user
github.password = gh_password
github.access_token = gh_token

# Check for 2-factor requirements
begin
client.user
say "GitHub account @#{github.user.login} successfully setup!"
rescue Octokit::Unauthorized
github.user(
gh_user,
headers: { "X-GitHub-OTP" => prompt.ask("Please enter your two-factor authentication code") }
)
say "GitHub could not authenticate with the provided token. Please check the token and try again."
end

say "GitHub account successfully setup!"
end
end

Expand Down
Loading
Loading