Skip to content

👷 Update guard-dependencies.yml workflow to allow modifying dependencies for non-fork PRs#209

Open
YuriiMotov wants to merge 2 commits into
mainfrom
fix-guard-dependencies-workflow
Open

👷 Update guard-dependencies.yml workflow to allow modifying dependencies for non-fork PRs#209
YuriiMotov wants to merge 2 commits into
mainfrom
fix-guard-dependencies-workflow

Conversation

@YuriiMotov
Copy link
Copy Markdown
Member

Currently guard-dependencies.yml closes PRs that modify dependencies even if PR branch is in the same repo (author has write permissions in the repo).

See #208

I suggest we modify it to make decision by checking if the PR branch is in the same repo

@YuriiMotov YuriiMotov force-pushed the fix-guard-dependencies-workflow branch from 7b865c4 to 2adfaf1 Compare May 29, 2026 21:11
@YuriiMotov YuriiMotov requested a review from svlandeg May 29, 2026 21:12
Copy link
Copy Markdown
Contributor

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

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

I'm not sure we need to edit anything. The reason the bot closed, is because your membership of fastapilabs is set to "private". We discussed this internally and I think decided to put those memberships "public" to allow the bot to work properly.

If you/the team prefers not to do that, then yea I guess we can change this rule, I don't really mind either way.

core.setFailed('Dependency changes are restricted to organization members.');
} else {
console.log(`Author ${author} (author_association=${assoc}) is allowed to make dependency changes.`);
console.log(`Author ${author} (sameRepo=${sameRepo}) is allowed to make dependency changes.`);
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.

I'm not sure it makes sense to still refer to author here? Maybe just something like "This PR (...) is allowed ..." ?

owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: `This PR modifies dependency files (\`pyproject.toml\` or \`uv.lock\`), which is restricted to members of the **${context.repo.owner}** organization on GitHub.\n\nIf you need a dependency change, please [open a discussion](https://github.com/${context.repo.owner}/${context.repo.repo}/discussions/new) describing what you need and why.\n\nClosing this PR automatically.`
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.

Should we also update the wording here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants