Skip to content

Move PR head ref to env variable#139

Closed
ShereinDabbah wants to merge 5 commits into
mainfrom
dev/sdabbah/FixCapabilitiesCompatibilityYaml
Closed

Move PR head ref to env variable#139
ShereinDabbah wants to merge 5 commits into
mainfrom
dev/sdabbah/FixCapabilitiesCompatibilityYaml

Conversation

@ShereinDabbah

Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings January 1, 2026 12:49

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 PR refactors a GitHub Actions workflow step to move the github.head_ref context variable into an environment variable before using it in the step output.

Key Changes

  • Introduces an env block to define PR_BRANCH from github.head_ref
  • Updates the PR_REF output assignment to use the new environment variable instead of the GitHub context directly

Comment thread .github/workflows/capabilities-compatibility.yml Outdated
Comment thread .github/workflows/capabilities-compatibility.yml
@Yarovinsky Yarovinsky assigned Yarovinsky and unassigned Yarovinsky Jan 5, 2026
@Yarovinsky Yarovinsky self-requested a review January 5, 2026 07:17
Copilot AI review requested due to automatic review settings January 5, 2026 13:06

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines 35 to 38
if: steps.check_changes.outputs.any_changed == 'true'
id: vars
run: |
echo "BASE_REF=${{ github.event.pull_request.base.ref }}" >> $GITHUB_OUTPUT

Copilot AI Jan 5, 2026

Copy link

Choose a reason for hiding this comment

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

For consistency, the BASE_REF should also be moved to an environment variable, similar to how PR_BRANCH is being set. This would make the code more maintainable and follow a consistent pattern for handling GitHub context variables.

Suggested change
if: steps.check_changes.outputs.any_changed == 'true'
id: vars
run: |
echo "BASE_REF=${{ github.event.pull_request.base.ref }}" >> $GITHUB_OUTPUT
BASE_REF: ${{ github.event.pull_request.base.ref }}
if: steps.check_changes.outputs.any_changed == 'true'
id: vars
run: |
echo "BASE_REF=$BASE_REF" >> $GITHUB_OUTPUT

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings January 6, 2026 08:02

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

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

@uve uve closed this Jan 6, 2026
@ShereinDabbah ShereinDabbah deleted the dev/sdabbah/FixCapabilitiesCompatibilityYaml branch January 8, 2026 07:25
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.

4 participants