Skip to content

Align workflow files with jdt.ui conventions for clean git history#52

Merged
carstenartur merged 2 commits into
masterfrom
copilot/update-sync-and-rebase-workflows
Feb 16, 2026
Merged

Align workflow files with jdt.ui conventions for clean git history#52
carstenartur merged 2 commits into
masterfrom
copilot/update-sync-and-rebase-workflows

Conversation

Copilot AI commented Feb 16, 2026

Copy link
Copy Markdown

The jdt.debug fork has messy git history compared to jdt.ui. The sync-upstream.yml and rebase-upstream.yml workflows exist but use inconsistent commit messages and outdated action versions. The fork-build.yml workflow is missing entirely.

Changes

  • sync-upstream.yml: Update commit message to "Fork-specific CI and workflow configurations" (was "Fork-specific customizations") for consistency with jdt.ui
  • rebase-upstream.yml: Bump actions/github-script from v7 to v8
  • fork-build.yml: Add new fork-specific build workflow with:
    • Maven build using build-individual-bundles profile
    • CodeQL analysis
    • Scheduled runs on Tuesdays at 9:20 AM UTC

All upstream references correctly point to eclipse-jdt/eclipse.jdt.debug.

Original prompt

Problem

The carstenartur/eclipse.jdt.debug fork has a messy git history compared to carstenartur/eclipse.jdt.ui. In jdt.ui, the sync-upstream.yml workflow correctly:

  1. Resets to upstream master
  2. Backs up fork-specific workflow files
  3. Restores them as a single commit ("Fork-specific CI and workflow configurations")
  4. Force-pushes, resulting in a clean history

In jdt.debug, the sync-upstream.yml and rebase-upstream.yml exist but are outdated/broken versions that don't work like the jdt.ui versions. The fork-build.yml is completely missing. The last commit is a merge commit from a Copilot agent PR, and there's no clean "Fork-specific CI and workflow configurations" commit on top like in jdt.ui.

Currently jdt.debug has these workflows: checkMergeCommits.yml, codacy.yml, codeql-analysis.yml, codeql.yml, dependency-review.yml, maven.yml, pr-checks.yml, publishVersionCheckResults.yml, rebase-upstream.yml, rebase.yml, sync-upstream.yml, unit-tests.yml, updateRelease.yml, verifyFreezePeriod.yml, version-increments.yml

The sync-upstream workflow will automatically detect which files are fork-specific by comparing with upstream.

What needs to be done

Replace/add the following workflow files in carstenartur/eclipse.jdt.debug, adapted from the working versions in carstenartur/eclipse.jdt.ui:

1. Replace .github/workflows/sync-upstream.yml with the jdt.ui version adapted for jdt.debug:

  • Upstream URL: https://github.com/eclipse-jdt/eclipse.jdt.debug.git
  • Success message: eclipse-jdt/eclipse.jdt.debug:master
  • Daily sync at 3 AM UTC
  • Manual trigger via /sync-upstream comment
  • Backup/restore fork-specific files
  • Single commit with "Fork-specific CI and workflow configurations"
  • Force push to keep history clean

The workflow should have two jobs:

sync-scheduled (runs on schedule or workflow_dispatch):

  1. Checkout fork master with full history
  2. Configure git as github-actions[bot]
  3. Add upstream remote https://github.com/eclipse-jdt/eclipse.jdt.debug.git and fetch master
  4. Identify fork-specific workflow files (files in .github/workflows/ that don't exist in upstream)
  5. Back them up to /tmp/fork-specific
  6. git reset --hard upstream/master
  7. Restore fork-specific files from backup
  8. Commit as "Fork-specific CI and workflow configurations"
  9. git push --force origin master

sync-manual (runs on issue_comment containing /sync-upstream):

  • Same sync logic as above
  • Permission check (OWNER, MEMBER, COLLABORATOR only)
  • Rocket reaction on start, +1 on success, -1 on failure
  • Success/failure comments on the issue

2. Replace .github/workflows/rebase-upstream.yml with the jdt.ui version adapted for jdt.debug:

  • All upstream URLs: https://github.com/eclipse-jdt/eclipse.jdt.debug.git
  • All messages referencing upstream: eclipse-jdt/eclipse.jdt.debug:master

Two jobs:
add-rebase-button (on PR open): Add comment with rebase instructions mentioning /rebase-upstream command
rebase-upstream (on /rebase-upstream comment on a PR):

  • Permission check
  • Get PR branch info and commit count
  • Checkout PR branch, rebase onto upstream/master using git rebase --onto upstream/master HEAD~${PR_COMMIT_COUNT}
  • Force push with lease
  • Success/failure comments with manual instructions on failure

3. Add .github/workflows/fork-build.yml (new file, does not exist yet):

name: "Fork Build"

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  schedule:
    - cron: '20 9 * * 2'

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [ 'java' ]

    steps:
    - name: Checkout repository
      uses: actions/checkout@v4
    - name: Set up Maven
      uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
      with:
        maven-version: 3.9.9
    - name: Setup Java JDK
      uses: actions/setup-java@v4
      with:
        distribution: 'temurin'
        java-version: '21'

    - name: Initialize CodeQL
      uses: github/codeql-action/init@v3
      with:
        languages: ${{ matrix.language }}

    - name: Build with Maven
      run: mvn -B package -Pbuild-individual-bundles --file pom.xml

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v3
      env:
        CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"interpret-results":["--max-paths", 1]}}'

Key requirement

All references to eclipse.jdt.ui in the workflow files from jdt.ui must be changed to eclipse.jdt.debug. The upstream org is eclipse-jdt for both.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…uild

Co-authored-by: carstenartur <3164220+carstenartur@users.noreply.github.com>
Copilot AI changed the title [WIP] Update sync and rebase workflows for cleaner git history Align workflow files with jdt.ui conventions for clean git history Feb 16, 2026
Copilot AI requested a review from carstenartur February 16, 2026 06:23
@carstenartur carstenartur marked this pull request as ready for review February 16, 2026 07:04
@carstenartur carstenartur merged commit d7ca0c0 into master Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants