Skip to content

Commit 097af8b

Browse files
authored
Add GitHub workflows for automated testing and release. (#1)
* Add GitHub workflows for automated testing and release.
1 parent 00b65f4 commit 097af8b

File tree

5 files changed

+76
-6
lines changed

5 files changed

+76
-6
lines changed

.github/workflows/gem-publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish Ruby Gem
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
push:
9+
name: Push gem to RubyGems.org
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
14+
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
15+
16+
steps:
17+
# Set up
18+
- uses: actions/checkout@v4
19+
- name: Set up Ruby
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
bundler-cache: true
23+
ruby-version: ruby
24+
25+
# Release
26+
- uses: rubygems/release-gem@v1

.github/workflows/linting.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Linting
2+
3+
on: pull_request
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Ruby
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: '3.1'
19+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
20+
- name: Rubocop
21+
run: bundle exec rubocop -f github

.github/workflows/unit-test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Unit Tests
2+
3+
on: pull_request
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test:
10+
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
ruby-version: ['3.1', '3.2', '3.3']
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: ${{ matrix.ruby-version }}
22+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
23+
- name: Run tests
24+
run: bundle exec rake spec

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
<p align="center">
1+
<p style="text-align: center">
22
<a href="https://www.upsun.com/">
3-
<img src="https://github.com/upsun/.github/blob/main/profile/logo.svg?raw=true" width="500px">
3+
<img src="https://github.com/upsun/.github/blob/main/profile/logo.svg?raw=true" width="500px" alt="Upsun logo">
44
</a>
5-
</p>
6-
5+
<br />
76
<br />
87
<a href="https://devcenter.upsun.com"><strong>Developer Center</strong></a>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
98
<a href="https://upsun.com/"><strong>Website</strong></a>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

lib/gitlab/triage/linear/migrator/issue_extension.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def process_comment(comment_body)
6464
end
6565

6666
# @todo: make these configurable
67-
LABEL_MIGRATION_FAILED = '/label ~"Linear::Migration Failed"'
68-
LABEL_MIGRATED = '/label ~"Linear::Migrated"'
67+
LABEL_MIGRATION_FAILED = '/label ~"Linear::Migration Failed"\n/remove_label ~"Linear::To Migrate"'
68+
LABEL_MIGRATED = '/label ~"Linear::Migrated"\n/remove_label ~"Linear::Migration Failed" ~"Linear::To Migrate"'
6969
CLOSE_ACTON = "/close"
7070

7171
def create_issue_in_linear(set_state: false, prepend_project_name: false, team_label_prefix: "Team")

0 commit comments

Comments
 (0)