modulesync 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/labeler.yml +5 -0
- data/.github/workflows/ci.yml +5 -5
- data/.github/workflows/labeler.yml +17 -0
- data/.github/workflows/release.yml +9 -9
- data/CHANGELOG.md +14 -2
- data/README.md +2 -2
- data/lib/modulesync/git_service/github.rb +7 -0
- data/lib/modulesync/version.rb +5 -0
- data/lib/modulesync.rb +1 -0
- data/modulesync.gemspec +2 -3
- data/spec/unit/module_sync/git_service/github_spec.rb +12 -0
- metadata +4 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b756f006e9c39eef2b7a94ec1f896866f22f88099978530b2e587565dc9826c8
|
|
4
|
+
data.tar.gz: 1d5fb83e96ee7974a09b12f91e6fea79997554fbe959d8ad6c29938d41f76ae8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b838e8aeaf52e6d0f2ff3dfbdc1a6c0ede1d1188862de5e6d7205632d94383782ef3aeaa2fb1150b18469a46c582ded2fad29621048657c4922453d69e4821ed
|
|
7
|
+
data.tar.gz: 19160e011a602778c435dfa18e5e7583fada6a7bfdca7ee125be0553b0b8acc795f10f986821bd3783a7dba9f5e8e1d6815565803f3411ab61b0a61c552e1d1b
|
data/.github/labeler.yml
ADDED
data/.github/workflows/ci.yml
CHANGED
|
@@ -16,16 +16,16 @@ jobs:
|
|
|
16
16
|
outputs:
|
|
17
17
|
ruby: ${{ steps.ruby.outputs.versions }}
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@v7
|
|
19
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
20
20
|
- name: Setup ruby
|
|
21
|
-
uses: ruby/setup-ruby@v1
|
|
21
|
+
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
|
|
22
22
|
with:
|
|
23
23
|
ruby-version: "3.4"
|
|
24
24
|
bundler-cache: true
|
|
25
25
|
- name: Run linter
|
|
26
26
|
run: bundle exec rake rubocop
|
|
27
27
|
- id: ruby
|
|
28
|
-
uses: voxpupuli/ruby-version@
|
|
28
|
+
uses: voxpupuli/ruby-version@656370e339050da63b86b1c631f5f88a3f4c0803 # 1.0.1
|
|
29
29
|
|
|
30
30
|
test:
|
|
31
31
|
name: "Ruby ${{ matrix.ruby }}"
|
|
@@ -36,9 +36,9 @@ jobs:
|
|
|
36
36
|
matrix:
|
|
37
37
|
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
|
|
38
38
|
steps:
|
|
39
|
-
- uses: actions/checkout@v7
|
|
39
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
40
40
|
- name: Install Ruby ${{ matrix.ruby }}
|
|
41
|
-
uses: ruby/setup-ruby@v1
|
|
41
|
+
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
|
|
42
42
|
with:
|
|
43
43
|
ruby-version: ${{ matrix.ruby }}
|
|
44
44
|
bundler-cache: true
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 🏷️ Pull Request Labeler
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
- pull_request_target
|
|
6
|
+
|
|
7
|
+
permissions: {}
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
labeler:
|
|
11
|
+
name: Labeler
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
if: github.repository_owner == 'voxpupuli' || github.repository_owner == 'OpenVoxProject'
|
|
14
|
+
permissions:
|
|
15
|
+
pull-requests: write
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/labeler@b8dd2d9be0f68b860e7dae5dae7d772984eacd6d # v6.2.0
|
|
@@ -15,16 +15,16 @@ jobs:
|
|
|
15
15
|
name: Build the gem
|
|
16
16
|
runs-on: ubuntu-24.04
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@v7
|
|
18
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
19
19
|
- name: Install Ruby
|
|
20
|
-
uses: ruby/setup-ruby@v1
|
|
20
|
+
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
|
|
21
21
|
with:
|
|
22
22
|
ruby-version: 'ruby'
|
|
23
23
|
- name: Build gem
|
|
24
24
|
shell: bash
|
|
25
25
|
run: gem build --verbose *.gemspec
|
|
26
26
|
- name: Upload gem to GitHub cache
|
|
27
|
-
uses: actions/upload-artifact@v7
|
|
27
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
28
28
|
with:
|
|
29
29
|
name: gem-artifact
|
|
30
30
|
path: '*.gem'
|
|
@@ -39,7 +39,7 @@ jobs:
|
|
|
39
39
|
contents: write # clone repo and create release
|
|
40
40
|
steps:
|
|
41
41
|
- name: Download gem from GitHub cache
|
|
42
|
-
uses: actions/download-artifact@v8
|
|
42
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
43
43
|
with:
|
|
44
44
|
name: gem-artifact
|
|
45
45
|
- name: Create Release
|
|
@@ -56,7 +56,7 @@ jobs:
|
|
|
56
56
|
packages: write # publish to rubygems.pkg.github.com
|
|
57
57
|
steps:
|
|
58
58
|
- name: Download gem from GitHub cache
|
|
59
|
-
uses: actions/download-artifact@v8
|
|
59
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
60
60
|
with:
|
|
61
61
|
name: gem-artifact
|
|
62
62
|
- name: Publish gem to GitHub packages
|
|
@@ -73,10 +73,10 @@ jobs:
|
|
|
73
73
|
id-token: write # rubygems.org authentication
|
|
74
74
|
steps:
|
|
75
75
|
- name: Download gem from GitHub cache
|
|
76
|
-
uses: actions/download-artifact@v8
|
|
76
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
77
77
|
with:
|
|
78
78
|
name: gem-artifact
|
|
79
|
-
- uses: rubygems/configure-rubygems-credentials@v2.1.0
|
|
79
|
+
- uses: rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a # v2.1.0
|
|
80
80
|
- name: Publish gem to rubygems.org
|
|
81
81
|
shell: bash
|
|
82
82
|
run: gem push *.gem
|
|
@@ -92,11 +92,11 @@ jobs:
|
|
|
92
92
|
- release-to-rubygems
|
|
93
93
|
steps:
|
|
94
94
|
- name: Download gem from GitHub cache
|
|
95
|
-
uses: actions/download-artifact@v8
|
|
95
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
96
96
|
with:
|
|
97
97
|
name: gem-artifact
|
|
98
98
|
- name: Install Ruby
|
|
99
|
-
uses: ruby/setup-ruby@v1
|
|
99
|
+
uses: ruby/setup-ruby@d45b1a4e94b71acab930e56e79c6aa188764e7f9 # v1.316.0
|
|
100
100
|
with:
|
|
101
101
|
ruby-version: 'ruby'
|
|
102
102
|
- name: Wait for release to propagate
|
data/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [4.
|
|
5
|
+
## [4.4.0](https://github.com/voxpupuli/modulesync/tree/4.4.0) (2026-07-09)
|
|
6
6
|
|
|
7
|
-
[Full Changelog](https://github.com/voxpupuli/modulesync/compare/
|
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/modulesync/compare/v4.3.0...4.4.0)
|
|
8
|
+
|
|
9
|
+
**Implemented enhancements:**
|
|
10
|
+
|
|
11
|
+
- feat: add best practices on how to version a gem [\#351](https://github.com/voxpupuli/modulesync/pull/351) ([rwaffen](https://github.com/rwaffen))
|
|
12
|
+
|
|
13
|
+
**Fixed bugs:**
|
|
14
|
+
|
|
15
|
+
- fix: add guess\_endpoint\_from for github, similar to gitlab [\#350](https://github.com/voxpupuli/modulesync/pull/350) ([rwaffen](https://github.com/rwaffen))
|
|
16
|
+
|
|
17
|
+
## [v4.3.0](https://github.com/voxpupuli/modulesync/tree/v4.3.0) (2026-07-09)
|
|
18
|
+
|
|
19
|
+
[Full Changelog](https://github.com/voxpupuli/modulesync/compare/4.2.0...v4.3.0)
|
|
8
20
|
|
|
9
21
|
**Implemented enhancements:**
|
|
10
22
|
|
data/README.md
CHANGED
|
@@ -200,7 +200,7 @@ or set them per repository in `managed_modules.yml`, using the `github` or
|
|
|
200
200
|
|
|
201
201
|
For GitHub Enterprise and self-hosted GitLab instances you also need to set the
|
|
202
202
|
`GITHUB_BASE_URL` or `GITLAB_BASE_URL` environment variables, or specify the
|
|
203
|
-
`base_url` parameter in `
|
|
203
|
+
`base_url` parameter per repository in `managed_modules.yml`:
|
|
204
204
|
|
|
205
205
|
```yaml
|
|
206
206
|
---
|
|
@@ -467,7 +467,7 @@ This gem is licensed under the Apache-2 license.
|
|
|
467
467
|
## Release information
|
|
468
468
|
|
|
469
469
|
To make a new release, please do:
|
|
470
|
-
* update the version in
|
|
470
|
+
* update the version in `lib/modulesync/version.rb`
|
|
471
471
|
* Install gems with `bundle install --with release --path .vendor`
|
|
472
472
|
* generate the changelog with `bundle exec rake changelog`
|
|
473
473
|
* Check if the new version matches the closed issues/PRs in the changelog
|
|
@@ -18,6 +18,13 @@ module ModuleSync
|
|
|
18
18
|
@api = Octokit::Client.new(access_token: token)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
+
def self.guess_endpoint_from(remote:)
|
|
22
|
+
endpoint = super
|
|
23
|
+
return 'https://api.github.com' if endpoint == 'https://github.com'
|
|
24
|
+
|
|
25
|
+
endpoint
|
|
26
|
+
end
|
|
27
|
+
|
|
21
28
|
private
|
|
22
29
|
|
|
23
30
|
def _open_pull_request(repo_path:, namespace:, title:, message:, source_branch:, target_branch:, labels:, noop:)
|
data/lib/modulesync.rb
CHANGED
data/modulesync.gemspec
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
+
require_relative 'lib/modulesync/version'
|
|
5
4
|
|
|
6
5
|
Gem::Specification.new do |spec|
|
|
7
6
|
spec.name = 'modulesync'
|
|
8
|
-
spec.version =
|
|
7
|
+
spec.version = ModuleSync::VERSION
|
|
9
8
|
spec.authors = ['Vox Pupuli']
|
|
10
9
|
spec.email = ['voxpupuli@groups.io']
|
|
11
10
|
spec.summary = 'Puppet Module Synchronizer'
|
|
@@ -5,6 +5,18 @@ require 'spec_helper'
|
|
|
5
5
|
require 'modulesync/git_service/github'
|
|
6
6
|
|
|
7
7
|
describe ModuleSync::GitService::GitHub do
|
|
8
|
+
describe '.guess_endpoint_from' do
|
|
9
|
+
it 'uses the public GitHub API endpoint for a github.com remote' do
|
|
10
|
+
expect(described_class.guess_endpoint_from(remote: 'git@github.com:test/modulesync.git'))
|
|
11
|
+
.to eq('https://api.github.com')
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it 'uses the remote hostname for a GitHub Enterprise remote' do
|
|
15
|
+
expect(described_class.guess_endpoint_from(remote: 'git@github.example.com:test/modulesync.git'))
|
|
16
|
+
.to eq('https://github.example.com')
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
8
20
|
context '::open_pull_request' do
|
|
9
21
|
before do
|
|
10
22
|
@client = double
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: modulesync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vox Pupuli
|
|
@@ -189,8 +189,10 @@ extra_rdoc_files: []
|
|
|
189
189
|
files:
|
|
190
190
|
- ".config/cucumber.yml"
|
|
191
191
|
- ".github/dependabot.yml"
|
|
192
|
+
- ".github/labeler.yml"
|
|
192
193
|
- ".github/release.yml"
|
|
193
194
|
- ".github/workflows/ci.yml"
|
|
195
|
+
- ".github/workflows/labeler.yml"
|
|
194
196
|
- ".github/workflows/release.yml"
|
|
195
197
|
- ".gitignore"
|
|
196
198
|
- ".rspec"
|
|
@@ -232,6 +234,7 @@ files:
|
|
|
232
234
|
- lib/modulesync/settings.rb
|
|
233
235
|
- lib/modulesync/source_code.rb
|
|
234
236
|
- lib/modulesync/util.rb
|
|
237
|
+
- lib/modulesync/version.rb
|
|
235
238
|
- lib/monkey_patches.rb
|
|
236
239
|
- modulesync.gemspec
|
|
237
240
|
- spec/helpers/faker.rb
|