-
Notifications
You must be signed in to change notification settings - Fork 12
34 lines (29 loc) · 1.12 KB
/
comment_contributing.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
name: Comment on the pull request
on:
workflow_call:
jobs:
comment-on-pr:
name: Comment on PR
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- name: Comment on PR
uses: actions/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const comments = "Thanks for opening a pull request! Please, check that you are following our \
[contributing guide](https://github.com/canonical/is-charms-contributing-guide/blob/main/CONTRIBUTING.md) \
and you are not introducing breaking changes in the target channel."
const owner = context.payload.repository.owner.login;
const repo = context.payload.repository.name;
const issue_number = context.payload.number;
await github.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: issue_number,
body: comments,
});