Skip to content

fix: PR close condition in e2e tests#2645

Merged
chmouel merged 1 commit intotektoncd:mainfrom
zakisk:fix-pr-close-in-e2e
Apr 7, 2026
Merged

fix: PR close condition in e2e tests#2645
chmouel merged 1 commit intotektoncd:mainfrom
zakisk:fix-pr-close-in-e2e

Conversation

@zakisk
Copy link
Copy Markdown
Member

@zakisk zakisk commented Apr 7, 2026

this fixes the if condition in TearDown func
for GitHub.

📝 Description of the Change

🔗 Linked GitHub Issue

Fixes #

🧪 Testing Strategy

  • Unit tests
  • Integration tests
  • End-to-end tests
  • Manual testing
  • Not Applicable

🤖 AI Assistance

AI assistance can be used for various tasks, such as code generation,
documentation, or testing.

Please indicate whether you have used AI assistance
for this PR and provide details if applicable.

  • I have not used any AI assistance for this PR.
  • I have used AI assistance for this PR.

Important

Slop will be simply rejected, if you are using AI assistance you need to make sure you
understand the code generated and that it meets the project's standards. you
need at least know how to run the code and deploy it (if needed). See
startpaac to make it easy
to deploy and test your code changes.

If the majority of the code in this PR was generated by an AI, please add a Co-authored-by trailer to your commit message.
For example:

Co-authored-by: Claude noreply@anthropic.com

✅ Submitter Checklist

  • 📝 My commit messages are clear, informative, and follow the project's How to write a git commit message guide. The Gitlint linter ensures in CI it's properly validated
  • ✨ I have ensured my commit message prefix (e.g., fix:, feat:) matches the "Type of Change" I selected above.
  • ♽ I have run make test and make lint locally to check for and fix any
    issues. For an efficient workflow, I have considered installing
    pre-commit and running pre-commit install to
    automate these checks.
  • 📖 I have added or updated documentation for any user-facing changes.
  • 🧪 I have added sufficient unit tests for my code changes.
  • 🎁 I have added end-to-end tests where feasible. See README for more details.
  • 🔎 I have addressed any CI test flakiness or provided a clear reason to bypass it.
  • If adding a provider feature, I have filled in the following and updated the provider documentation:
    • GitHub App
    • GitHub Webhook
    • Gitea/Forgejo
    • GitLab
    • Bitbucket Cloud
    • Bitbucket Data Center

this fixes the if condition in TearDown func
for GitHub.

Signed-off-by: Zaki Shaikh <zashaikh@redhat.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the TearDown method in test/pkg/github/pr.go to refine the condition for closing a GitHub pull request. The check for g.PRNumber has been changed from != -1 to > 0 to more accurately validate the pull request number before proceeding with the API call. No review comments were provided, and I have no additional feedback.

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.80%. Comparing base (010acfd) to head (4484195).
⚠️ Report is 3 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2645   +/-   ##
=======================================
  Coverage   58.80%   58.80%           
=======================================
  Files         206      206           
  Lines       20296    20296           
=======================================
  Hits        11935    11935           
  Misses       7589     7589           
  Partials      772      772           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chmouel
Copy link
Copy Markdown
Member

chmouel commented Apr 7, 2026

/lgtm

image

Copy link
Copy Markdown

@pipelines-as-code pipelines-as-code bot left a comment

Choose a reason for hiding this comment

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

Congrats @zakisk your PR Has been approved 🎉

✅ Pull Request Approved

Approval Status:

  • Required Approvals: 1
  • Current Approvals: 1

👥 Reviewers Who Approved:

Reviewer Permission Level Approval Status
@chmouel admin

📝 Next Steps

  • Ensure all required checks pass
  • Comply with branch protection rules
  • Request a maintainer to merge using the /merge command (or merge it
    directly if you have repository permission).

Automated by the PAC Boussole 🧭

@chmouel chmouel merged commit a8db555 into tektoncd:main Apr 7, 2026
14 checks passed
@zakisk zakisk deleted the fix-pr-close-in-e2e branch April 7, 2026 09:27
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.

3 participants