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
33 changes: 3 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build

on: [pull_request]

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

Expand All @@ -11,32 +11,5 @@ permissions:

jobs:
ci:
name: 🧪 Test & lint
environment: ci
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5.0.1
with:
fetch-depth: 0

# - name: Commit message lint
# uses: wagoid/commitlint-github-action@v4

- name: Setup JDK 17
uses: actions/setup-java@v5.1.0
with:
distribution: 'corretto'
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Test
env:
STREAM_BASE_URL: ${{ vars.STREAM_BASE_URL }}
STREAM_API_KEY: ${{ vars.STREAM_API_KEY }}
STREAM_API_SECRET: ${{ secrets.STREAM_API_SECRET }}
run: |
./gradlew spotlessCheck
./gradlew build --info
uses: ./.github/workflows/run_tests.yml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Must Fix] Renaming this job locks main.

Branch protection on main requires the status check 🧪 Test & lint:

evidence
$ gh api repos/GetStream/stream-sdk-java/branches/main/protection
"checks": [{"context": "🧪 Test & lint", "app_id": 15368}]

$ gh api repos/GetStream/stream-sdk-java/commits/1ef6336/check-runs
ci / Build	completed	success

$ grep -rn "Test & lint" .github/
(no match)

A reusable-workflow call reports as <caller job id> / <called job name>, so the check is now ci / Build and nothing produces the old name again.

Why it matters: once this merges, every PR into main waits on a required check that can never report, including release-please's Release PR. Releases then need an admin bypass every time.

Fix: update the required contexts to ci / Build in the same window as the merge. Worth adding 👮 Conventional PR title while you are in there, since it is the only thing between a non-conventional title and a silent no-release.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the other way round, in fbb81df: the job keeps name: 🧪 Test & lint, so the reusable call reports as ci / 🧪 Test & lint and the required context becomes a prefix change instead of a rename. Confirmed on this head, the check reports under that name.

Merge-time command, with the title gate added as you suggested (strict has to be repeated, the PATCH replaces the whole object):

gh api -X PATCH repos/GetStream/stream-sdk-java/branches/main/protection/required_status_checks \
  -F strict=true \
  -f "contexts[]=ci / 🧪 Test & lint" \
  -f "contexts[]=👮 Conventional PR title"

secrets: inherit
48 changes: 0 additions & 48 deletions .github/workflows/initiate_release.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/pr_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Lint PR title

on:
pull_request:
types: [opened, edited, reopened, synchronize]

permissions:
pull-requests: read

jobs:
pr_title:
name: 👮 Conventional PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83 changes: 0 additions & 83 deletions .github/workflows/publish-new-version.yml

This file was deleted.

Loading
Loading