Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ci: fix cla and dependabot notifications jobs #16343

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

Merged
merged 5 commits into from
Jan 31, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove dependabot logic
  • Loading branch information
matifali authored Jan 30, 2025
commit 2b057b51a374e996d8551dfa58e0d6f94e83f9fe
81 changes: 0 additions & 81 deletions .github/workflows/contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ on:
- edited
# For jobs that don't run on draft PRs.
- ready_for_review
pull_request: # for dependabot PRs
types:
- opened
push:
branches:
- main

permissions:
contents: read
Expand All @@ -28,81 +22,6 @@ permissions:
concurrency: pr-${{ github.ref }}

jobs:
# Dependabot is annoying, but this makes it a bit less so.
dependabot-automerge:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'coder/coder'
permissions:
pull-requests: write
contents: write
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Approve the PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Enable auto-merge
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

dependabot-automerge-notify:
# Send a slack notification when a dependabot PR is merged.
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.actor == 'github-actions[bot]'
steps:
- name: Send Slack notification
env:
PR_URL: ${{github.event.pull_request.html_url}}
PR_TITLE: ${{github.event.pull_request.title}}
PR_NUMBER: ${{github.event.pull_request.number}}
run: |
curl -X POST -H 'Content-type: application/json' \
--data '{
"username": "dependabot",
"icon_url": "https://avatars.githubusercontent.com/u/27347476",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":pr-merged: Auto merged Dependabot PR #${{ env.PR_NUMBER }}",
"emoji": true
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "${{ env.PR_TITLE }}"
}
]
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "View PR"
},
"url": "${{ env.PR_URL }}"
}
]
}
]
}' ${{ secrets.DEPENDABOT_PRS_SLACK_WEBHOOK }}

cla:
runs-on: ubuntu-latest
permissions:
Expand Down