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

Use dependabot #25

Closed
wants to merge 2 commits into from
Closed

Use dependabot #25

wants to merge 2 commits into from

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Jul 21, 2020

Use dependabot so tests run on dependency bumps

Comment on lines +77 to +95
# Automerge:
# needs: [Test, Lint]
# runs-on: ubuntu-latest
# if: |
# github.actor == 'dependabot[bot]' &&
# github.event_name == 'pull_request' &&
# startsWith(github.event.pull_request.title, 'chore(deps-dev):')
# steps:
# - name: '@dependabot merge'
# uses: actions/github-script@v2
# with:
# github-token: ${{secrets.GH_TOKEN}}
# script: |
# await github.issues.createComment({
# owner: context.payload.repository.owner.login,
# repo: context.payload.repository.name,
# issue_number: context.payload.pull_request.number,
# body: '@dependabot merge'
# })
Copy link
Member Author

@UziTech UziTech Jul 21, 2020

Choose a reason for hiding this comment

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

Auto Merge would require a token with public_repo permission in secrets.GH_TOKEN

the default secrets.GITHUB_TOKEN won't work since it doesn't have push permission.

@aminya
Copy link
Member

aminya commented Jul 21, 2020

@UziTech Thank you for this. But dependant bot does not support updating all the dependencies in a single pull request and spams my email and notifications for every single package. I created my custom dependency bumper because of that.

See this issue: dependabot/dependabot-core#1296 (comment)

@UziTech
Copy link
Member Author

UziTech commented Jul 21, 2020

The problem with the github actions script is that it does not run the other github actions when it creates the PR.

@aminya
Copy link
Member

aminya commented Jul 21, 2020

To circumvent that we can add steps after bumping. If you like to run the tests after bumping (before creating the pull request), we can just add a step to run the tests. If it fails, it will not create a pull request, and that means the new dependency is not compatible with the package.

Using our custom script is much more flexible. You can use all of the npm-check-updates features to write a proper bump script. For example, I use

ncu -u -x coffeescript

to reject updating coffeescript to v2 as it is not supported by Atom.

@UziTech
Copy link
Member Author

UziTech commented Jul 22, 2020

But then it is an all or none. If one update fails the tests the the PR doesn't get created for any of the updates.

Just seems like more work when there are easier ways to circumvent notifications.

@aminya
Copy link
Member

aminya commented Jul 22, 2020

Yes. Failing the bump means I need to take care of at least one of the dependencies which has broken the tests. I find this better compared to getting spammed by the bot.

Other than the reasons I mentioned earlier, I switched to pnpm to save disk space and time. I do not think dependant bot supports pnpm. pnpm features worth the hassle of diagnosing the failure caused in the bump deps action.

#27

With all of these being said, dependant bot is installed on the organization and anyone can use it if they likethat instead.

@UziTech UziTech closed this Aug 3, 2020
@aminya
Copy link
Member

aminya commented Aug 3, 2020

@UziTech Sorry about this. I hope they improve things. I am tracking the issue in dependabot/dependabot-core#1296 (comment)

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.

2 participants