Skip to content

feat: Shorten workflow job names, add required checks, optimize runners, and restrict permissions#228

Open
Copilot wants to merge 9 commits into
mainfrom
copilot/rename-code-quality-jobs
Open

feat: Shorten workflow job names, add required checks, optimize runners, and restrict permissions#228
Copilot wants to merge 9 commits into
mainfrom
copilot/rename-code-quality-jobs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 31, 2026

Workflow job names were too verbose, making the workflow status difficult to scan. This PR shortens the job names across multiple workflows, adds a required checks aggregation job to fix status check issues, optimizes runner usage for better cost efficiency, and restricts GITHUB_TOKEN permissions for enhanced security.

Changes

CI workflow:

  • Code quality - unit-tests (${{ matrix.gap-branch }})Code - units (${{ matrix.gap-branch }})
  • Code quality - gaplintCode - lint
  • Added Required checks - pull-request job that aggregates the status of all CI jobs
  • Added explicit permissions to all CI jobs to restrict GITHUB_TOKEN (addresses issue [Bug]: Limit CI jobs permissions #231):
    • gaptest and gaplint: contents: read (minimal read-only access)
    • required: empty permissions {} (no GitHub API access needed)

Labels workflow:

  • Labels - auto-createLabels - auto

Release workflows:

  • Release the GAP packageRelease
  • Release draft - update release notesRelease - draft

Runner optimization:

All changes in .github/workflows/*.yml files.

The new required checks job depends on both gaptest and gaplint jobs and will fail if any dependency fails. Configure "Required checks - pull-request" as a required status check in branch protection rules to ensure all CI jobs pass before merging.

The explicit permissions follow security best practices by limiting GITHUB_TOKEN access using the principle of least privilege, preventing potential security vulnerabilities from overly permissive defaults.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug]: Rename Code quality</issue_title>
<issue_description>### What happened?

Rename Code quality jobs.

  • unit-tests is too long.
  • Code-quality is too long too.

Keep it shorter but still readable.

Version

0.5.0 (Default)

What browsers are you seeing the problem on?

No response

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct</issue_description>

Comments on the Issue (you are @copilot in this section)


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

Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Copilot AI changed the title [WIP] Rename code quality jobs for brevity Shorten CI job names Jan 31, 2026
Copilot AI requested a review from limakzi January 31, 2026 23:17
Comment thread .github/workflows/CI.yml Outdated
Comment thread .github/workflows/CI.yml Outdated
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Comment thread .github/workflows/CI.yml Outdated
Comment thread .github/workflows/CI.yml Outdated
Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Copilot AI requested a review from limakzi January 31, 2026 23:24
@limakzi limakzi changed the title Shorten CI job names feat: Shorten CI job names Jan 31, 2026
@limakzi limakzi marked this pull request as ready for review January 31, 2026 23:26
Copilot AI review requested due to automatic review settings January 31, 2026 23:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR shortens verbose CI job names in the GitHub Actions workflow to improve readability and make the workflow status easier to scan at a glance.

Changes:

  • Renamed Code quality - unit-tests to Code - units
  • Renamed Code quality - gaplint to Code - lint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@limakzi
Copy link
Copy Markdown
Collaborator

limakzi commented Jan 31, 2026

@copilot
Now expected status failed, because required jobs were not executed.
Here you have a sample from @mitchellh from https://github.com/ghostty-org/ghostty project.
Align it to smallantimagmas.

  1. Add required job.
  2. Name it Required checks - pull-request
  3. Assume everything is required.
jobs:
  required:
    name: "Required Checks: Test"
    runs-on: namespace-profile-ghostty-xsm
    needs:
      - build-bench
      - build-dist
      - build-examples
      - build-flatpak
      - build-libghostty-vt
      - build-linux
      - build-linux-libghostty
      - build-nix
      - build-macos
      - build-macos-freetype
      - build-snap
      - build-windows
      - test
      - test-simd
      - test-gtk
      - test-sentry-linux
      - test-i18n
      - test-macos
      - pinact
      - prettier
      - alejandra
      - typos
      - shellcheck
      - translations
      - blueprint-compiler
      - test-pkg-linux
      - test-debian-13
      - valgrind
      - zig-fmt

    steps:
      - id: status
        name: Determine status
        run: |
          results=$(tr -d '\n' <<< '${{ toJSON(needs.*.result) }}')
          if ! grep -q -v -E '(failure|cancelled)' <<< "$results"; then
            result="failed"
          else
            result="success"
          fi
          {
            echo "result=${result}"
            echo "results=${results}"
          } | tee -a "$GITHUB_OUTPUT"
      - if: always() && steps.status.outputs.result != 'success'
        name: Check for failed status
        run: |
          echo "One or more required build workflows failed: ${{ steps.status.outputs.results }}"
          exit 1

Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 31, 2026

@copilot
Now expected status failed, because required jobs were not executed.
Here you have a sample from @mitchellh from https://github.com/ghostty-org/ghostty project.
...

Added the "Required checks - pull-request" job in commit 1ab0052. This job aggregates the status of both gaptest and gaplint jobs. Configure this single job name in your branch protection rules to ensure all checks pass before merging.

Copilot AI changed the title feat: Shorten CI job names feat: Shorten CI job names and add required checks aggregation Jan 31, 2026
Copilot AI requested a review from limakzi January 31, 2026 23:39
Comment thread .github/workflows/CI.yml Fixed
Comment thread .github/workflows/CI.yml Fixed
@limakzi
Copy link
Copy Markdown
Collaborator

limakzi commented Jan 31, 2026

@copilot Try to simplify Release and Labels.

Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 31, 2026

@copilot Try to simplify Release and Labels.

Simplified job names in Release and Labels workflows in commit c143d83:

  • "Labels - auto-create" → "Labels - auto"
  • "Release the GAP package" → "Release"
  • "Release draft - update release notes" → "Release - draft"

Copilot AI changed the title feat: Shorten CI job names and add required checks aggregation feat: Shorten workflow job names and add required checks aggregation Jan 31, 2026
Copilot AI requested a review from limakzi January 31, 2026 23:52
@limakzi
Copy link
Copy Markdown
Collaborator

limakzi commented Feb 1, 2026

@copilot Cover this issue as well.

#229

Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 1, 2026

@copilot Cover this issue as well.

#229

Addressed issue #229 in commit 4ecac07. Changed all 9 runners across all workflows from ubuntu-latest/ubuntu-22.04 to ubuntu-slim for jobs that run under 15 minutes.

Copilot AI changed the title feat: Shorten workflow job names and add required checks aggregation feat: Shorten workflow job names, add required checks, and optimize runners Feb 1, 2026
Comment thread .github/workflows/CI.yml Fixed
Comment thread .github/workflows/CI.yml Fixed
@limakzi
Copy link
Copy Markdown
Collaborator

limakzi commented Feb 1, 2026

@copilot Cover this issue #231 as well.

Co-authored-by: limakzi <50334623+limakzi@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 1, 2026

@copilot Cover this issue #231 as well.

Addressed issue #231 in commit 3204d94. Added explicit permissions to all CI jobs:

  • gaptest and gaplint: contents: read
  • required: empty permissions {}

This restricts the GITHUB_TOKEN permissions following security best practices.

Copilot AI changed the title feat: Shorten workflow job names, add required checks, and optimize runners feat: Shorten workflow job names, add required checks, optimize runners, and restrict permissions Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Rename Code quality

4 participants