[PR #6622] Restrict AI-generated release notes workflow to PRs targeting master branch #6634

Closed
opened 2026-02-28 21:30:55 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6622

State: closed
Merged: Yes


The AI-generated release notes workflow currently triggers for all PRs regardless of target branch. This causes unnecessary runs for PRs targeting release branches, feature branches, or other non-master branches.

Changes

  • Modified .github/actions/ai-generated-release-notes/pr-details.js to include the base branch (baseBranch) in its output
  • Added a new step "Check if PR targets master branch" in .github/workflows/ai-generated-release-notes.yml that validates the PR's base branch
  • Updated the condition for subsequent steps to only proceed when targets_master == 'true'
- name: Check if PR targets master branch
  if: steps.check-first-comment.outputs.result == 'true' && steps.pr-details.outputs.result != 'null'
  id: check-base-branch
  run: |
    BASE_BRANCH=$(echo '${{ steps.pr-details.outputs.result }}' | jq -r '.baseBranch')
    echo "Base branch: $BASE_BRANCH"
    if [ "$BASE_BRANCH" = "master" ]; then
      echo "targets_master=true" >> $GITHUB_OUTPUT
    else
      echo "targets_master=false" >> $GITHUB_OUTPUT
      echo "PR does not target master branch, skipping release notes generation"
    fi

The AI-generated release notes workflow now only executes when PRs target master as the base branch, reducing unnecessary API calls and CI overhead for branch-to-branch PRs. The release notes checking workflow (.github/workflows/release-notes.yml) continues to run on all PRs as intended.

Original prompt

This section details on the original issue you should resolve

<issue_title>Auto-generated release notes job should only trigger for PRs against master branch</issue_title>
<issue_description>Currently, the auto-generated release notes job triggers for all PRs regardless of the target branch. This should be updated to only trigger when PRs are opened against the master branch.

Context:

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


Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

**Original Pull Request:** https://github.com/actualbudget/actual/pull/6622 **State:** closed **Merged:** Yes --- The AI-generated release notes workflow currently triggers for all PRs regardless of target branch. This causes unnecessary runs for PRs targeting release branches, feature branches, or other non-master branches. ## Changes - Modified `.github/actions/ai-generated-release-notes/pr-details.js` to include the base branch (`baseBranch`) in its output - Added a new step "Check if PR targets master branch" in `.github/workflows/ai-generated-release-notes.yml` that validates the PR's base branch - Updated the condition for subsequent steps to only proceed when `targets_master == 'true'` ```yaml - name: Check if PR targets master branch if: steps.check-first-comment.outputs.result == 'true' && steps.pr-details.outputs.result != 'null' id: check-base-branch run: | BASE_BRANCH=$(echo '${{ steps.pr-details.outputs.result }}' | jq -r '.baseBranch') echo "Base branch: $BASE_BRANCH" if [ "$BASE_BRANCH" = "master" ]; then echo "targets_master=true" >> $GITHUB_OUTPUT else echo "targets_master=false" >> $GITHUB_OUTPUT echo "PR does not target master branch, skipping release notes generation" fi ``` The AI-generated release notes workflow now only executes when PRs target `master` as the base branch, reducing unnecessary API calls and CI overhead for branch-to-branch PRs. The release notes checking workflow (`.github/workflows/release-notes.yml`) continues to run on all PRs as intended. <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Auto-generated release notes job should only trigger for PRs against master branch</issue_title> > <issue_description>Currently, the auto-generated release notes job triggers for all PRs regardless of the target branch. This should be updated to only trigger when PRs are opened against the `master` branch. > > **Context:** > - Requested by @MatissJanis in PR actualbudget/actual#6596 > - PR URL: https://github.com/actualbudget/actual/pull/6596</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes actualbudget/actual#6597 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/actualbudget/actual/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
GiteaMirror added the pull-request label 2026-02-28 21:30:55 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#6634