Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only run the backport job on merged pull requests #3134

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

peternied
Copy link
Member

@peternied peternied commented Aug 8, 2023

Description

Only run the backport job on merged pull requests

Issues Resolved

From the GitHub Action log, we'd see an error about branch_name not being used, and the error that backports should only run on merged PRs. This should reduce noisy failures in our logs.

Warning: Unexpected input(s) 'branch_name', valid inputs are ['body_template', 'files_to_skip', 'github_token', 'head_template', 'label_pattern', 'labels_template', 'title_template', 'failure_labels']
Run VachaShah/backport@v[2](https://github.com/opensearch-project/security/actions/runs/5802658423/job/15729398925?pr=3132#step:3:2).2.0
Error: Error: For security reasons, this action should only run on merged PRs.

Example [workflow failure], see more [failures].

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Merging #3134 (3f2d219) into main (7219feb) will decrease coverage by 0.10%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main    #3134      +/-   ##
============================================
- Coverage     62.46%   62.37%   -0.10%     
+ Complexity     3354     3347       -7     
============================================
  Files           254      254              
  Lines         19749    19749              
  Branches       3334     3334              
============================================
- Hits          12336    12318      -18     
- Misses         5783     5795      +12     
- Partials       1630     1636       +6     

see 6 files with indirect coverage changes

@reta reta merged commit 5f7efa5 into opensearch-project:main Aug 9, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.x
# Create a new branch
git switch --create backport/backport-3134-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5f7efa5a7ba40bcf5fbf629b84967a4aa8cc46b5
# Push it to GitHub
git push --set-upstream origin backport/backport-3134-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-3134-to-2.x.

@peternied peternied deleted the limit-backporting branch August 10, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants