Skip to content

Refactor GitHub workflows to simplify environment variable usage and … - #27

Merged
ptr727 merged 1 commit into
developfrom
flow
Feb 24, 2026
Merged

Refactor GitHub workflows to simplify environment variable usage and …#27
ptr727 merged 1 commit into
developfrom
flow

Conversation

@ptr727

@ptr727 ptr727 commented Feb 24, 2026

Copy link
Copy Markdown
Owner

…improve branch condition checks

…improve branch condition checks

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 24, 2026 16:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors GitHub Actions workflows to simplify configuration and improve branch condition checks. The changes remove redundant workflow-level environment variables, replacing them with direct inline values and more accurate branch name checks using github.ref_name instead of endsWith(github.ref, 'refs/heads/main'). Additionally, the PR adds the codegen branch to the pull request trigger in the test workflow.

Changes:

  • Eliminated workflow-level environment variables (IS_MAIN_BRANCH, PROJECT_FILE, PROJECT_ARTIFACT, DOCKER_REGISTRY, DOCKER_TAG_PREFIX, DOCKER_FILE) across multiple workflow files
  • Improved branch detection logic by using github.ref_name == 'main' instead of endsWith(github.ref, 'refs/heads/main'), which is more direct and avoids potential edge cases with branch names containing slashes
  • Enhanced YAML formatting by switching from fold scalars (>-) to literal scalars (|) with explicit backslash line continuations for better readability

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/test-pull-request.yml Added codegen to the list of branches that trigger pull request tests
.github/workflows/build-release-task.yml Removed IS_MAIN_BRANCH env var and updated prerelease condition to use github.ref_name != 'main'
.github/workflows/build-library-task.yml Removed env vars, improved YAML formatting with literal scalars and backslash continuations, inlined file paths and artifact names
.github/workflows/build-executable-task.yml Applied same refactoring as library task: removed env vars, improved formatting, inlined values
.github/workflows/build-docker-task.yml Removed Docker-related env vars, inlined values, removed redundant registry parameter (defaults to docker.io)
.github/workflows/build-datebadge-task.yml Removed IS_MAIN_BRANCH env var and updated condition to use github.ref_name == 'main'

@ptr727
ptr727 enabled auto-merge (squash) February 24, 2026 16:11
@ptr727
ptr727 merged commit 9c1ea66 into develop Feb 24, 2026
23 checks passed
@ptr727
ptr727 deleted the flow branch February 24, 2026 16:17
ptr727 added a commit that referenced this pull request Jul 12, 2026
…282)

The canonical codecov.yml comment said 'Coverage is reported and
trended, never gated', which is misleading: Python repos gate coverage
via pytest `fail_under`. Scope the claim to Codecov's advisory statuses
(true in every tier). Surfaced by Copilot on aiopurpleair #27; the two
Python repos in flight already carry the reworded comment.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ptr727 added a commit that referenced this pull request Aug 5, 2026
…e cross-repo issue refs

Both from the Copilot review on #571.

The escalation about a downstream repo holding its own audit report
claimed the two files sit at the same relative path. They do not. The
hub's is `reports/blog/audit.md` and the downstream one is
`reports/Blog/audit.md`, differing in the case of one directory, so the
claim overstated the collision it was raising.

The review read this as a typo in the citation and asked for the
lowercase form. That fix would have been wrong in the other direction,
because the downstream path really is capital-B and lowercasing the
citation would misquote the repo being audited. What was actually wrong
was the sentence around it, so the escalation now names the case
difference and says why it makes the confusion worse rather than better:
it is invisible on a case-insensitive filesystem, and a reader takes it
for a typo rather than for a boundary.

The matrix abbreviated two of three cross-repo issue references to bare
`#28` and `#29` after a qualified `ptr727/Blog#27`. In a hub document a
bare reference is a hub reference, which is the file's own convention
for #339, #456, and #558. The ambiguity is concrete rather than
theoretical: ProjectTemplate #27, #28, and #29 all exist, so the bare
forms rendered as links to unrelated merged pull requests in this repo.
All three are fully qualified now.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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