Skip to content

Commit

Permalink
Fix workflow (trigger on push)
Browse files Browse the repository at this point in the history
  • Loading branch information
niki4 authored Jan 29, 2025
1 parent 63922b7 commit 044af93
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/renovate-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
name: Renovatebot - Trigger integration tests on PR update

on:
pull_request:
# Assuming Renovate creates branches with a specific prefix
push:
branches:
- 'renovate/**'

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Post a comment
uses: actions/github-script@v3
- name: Checkout code
uses: actions/checkout@v2

Check failure on line 14 in .github/workflows/renovate-integration-tests.yml

View workflow job for this annotation

GitHub Actions / lint

14:1 [trailing-spaces] trailing spaces
- name: Post a comment on the PR
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue_number = context.payload.pull_request.number;
const comment = "/it-go";
github.issues.createComment({
...context.repo,
issue_number,
body: comment
const branch = context.ref.replace('refs/heads/', '');
const repository = context.repo.repo;
const owner = context.repo.owner;
// Find PRs associated with the branch
const { data: pullRequests } = await github.rest.pulls.list({
owner: owner,
repo: repository,
head: `${owner}:${branch}`,
state: 'open'
});
// Post a comment to each found PR
for (const pr of pullRequests) {
await github.rest.issues.createComment({
issue_number: pr.number,
owner: owner,
repo: repository,
body: '/it-go'
});
}

0 comments on commit 044af93

Please sign in to comment.