Skip to content

Conversation

@rafaeltonholo
Copy link
Member

Whenever @dependabot updates an Android version, the app will challenge the new version with the dependency guard, and the CI will fail.

This PR creates a workflow that, whenever @dependabot opens, reopens or updates a PR, this workflow will trigger and update the dependency guard if required.

wmontwe
wmontwe previously approved these changes Sep 17, 2025
Copy link
Member

@wmontwe wmontwe left a comment

Choose a reason for hiding this comment

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

LGTM

@coreycb
Copy link
Collaborator

coreycb commented Sep 17, 2025

I don't think the git push will work because the default permissions for actions on this repo don't allow write. I would hope those settings apply to PR branches as well. I think we should be reducing the "permissions:" of the GITHUB_TOKEN to at least read, and instead use actions/create-github-app-token.

@rafaeltonholo
Copy link
Member Author

I don't think the git push will work because the default permissions for actions on this repo don't allow write. I would hope those settings apply to PR branches as well. I think we should be reducing the "permissions:" of the GITHUB_TOKEN to at least read, and instead use actions/create-github-app-token.

Since this only pushes to the pull request's branch, I don't think it will require any special permissions. I reviewed the documentation again and realized that I had missed adding the ref parameter to the action/checkout. This is likely going to cause an issue, as it checks out in detached HEAD mode.

Aside from that adjustment, I believe we should be able to commit and push without any issues. I don't think we need a custom token for this, as it still requires approval as part of the pull request process.

@rafaeltonholo rafaeltonholo force-pushed the ci/add-dependabot-dependency-guard-update-workflow branch from d87644f to 02deb27 Compare September 17, 2025 14:18
@rafaeltonholo rafaeltonholo force-pushed the ci/add-dependabot-dependency-guard-update-workflow branch from 02deb27 to c72d3a3 Compare September 17, 2025 14:21
@coreycb
Copy link
Collaborator

coreycb commented Sep 17, 2025

I don't think the git push will work because the default permissions for actions on this repo don't allow write. I would hope those settings apply to PR branches as well. I think we should be reducing the "permissions:" of the GITHUB_TOKEN to at least read, and instead use actions/create-github-app-token.

Since this only pushes to the pull request's branch, I don't think it will require any special permissions. I reviewed the documentation again and realized that I had missed adding the ref parameter to the action/checkout. This is likely going to cause an issue, as it checks out in detached HEAD mode.

Aside from that adjustment, I believe we should be able to commit and push without any issues. I don't think we need a custom token for this, as it still requires approval as part of the pull request process.

I agree and the permissions should be reduced to read already based on the repo settings. LGTM

@rafaeltonholo rafaeltonholo merged commit 1907b4f into thunderbird:main Sep 17, 2025
13 checks passed
@rafaeltonholo rafaeltonholo deleted the ci/add-dependabot-dependency-guard-update-workflow branch September 17, 2025 15:39
@thunderbird-botmobile thunderbird-botmobile bot added this to the Thunderbird 14 milestone Sep 17, 2025
rafaeltonholo added a commit to rafaeltonholo/thunderbird-android that referenced this pull request Oct 10, 2025
…bot-dependency-guard-update-workflow

ci(dependabot): add workflow to automatically update dependency guard when dependabot creates a PR
rafaeltonholo added a commit to rafaeltonholo/thunderbird-android that referenced this pull request Oct 10, 2025
…bot-dependency-guard-update-workflow

ci(dependabot): add workflow to automatically update dependency guard when dependabot creates a PR
rafaeltonholo added a commit to rafaeltonholo/thunderbird-android that referenced this pull request Oct 10, 2025
…bot-dependency-guard-update-workflow

ci(dependabot): add workflow to automatically update dependency guard when dependabot creates a PR
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