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

fix(ci): let the fork workflow use the forked repository and be stricter #960

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

gagik
Copy link
Contributor

@gagik gagik commented Feb 20, 2025

From https://github.com/mongodb-js/vscode/actions/runs/13435011260/job/37535233590?pr=959 we see that the intentionally failing tests aren't failing. We need to be explicit about the repository to check out in this case.

@@ -10,7 +10,7 @@ permissions:
jobs:
test-and-build:
name: Test and Build
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.head.repo.full_name != github.repository
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.event.pull_request.head.repo.full_name != github.repository
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume this is unintentional and we'd want to be strict about this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get this second term, actually. If the pull request's repo ISN'T this one?

Copy link
Contributor

@lerouxb lerouxb Feb 20, 2025

Choose a reason for hiding this comment

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

Oh I see it is happening from a fork, not a branch in this repo? But I'm looking at past dependabot PRs (such as this one #956) and they seem to just be branches on this repo. Where are the forks?

Copy link
Contributor Author

@gagik gagik Feb 20, 2025

Choose a reason for hiding this comment

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

oh nevermind, I thought this was workflow was meant only for dependabot which forked the repo but I guess it's meant to be external users or dependabot. but the latter condition is basically a way of checking "this is a fork"

@gagik gagik requested a review from nirinchev February 20, 2025 12:22
@gagik gagik added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Feb 20, 2025
@gagik gagik changed the title fix(ci): make the workflow checkout the forked repository and be stricter fix(ci): let the fork workflow use the forked repository and be stricter Feb 20, 2025
@gagik gagik force-pushed the gagik/fix-fork-workflow branch from 1ce6902 to 73e233a Compare February 20, 2025 12:32
@gagik gagik force-pushed the gagik/fix-fork-workflow branch from 73e233a to 6a892da Compare February 20, 2025 12:34
@gagik gagik mentioned this pull request Feb 20, 2025
@gagik gagik merged commit ae11347 into main Feb 20, 2025
9 checks passed
@gagik gagik deleted the gagik/fix-fork-workflow branch February 20, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants