Skip to content

Commit

Permalink
Create reviewer.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayank77maruti authored Jan 2, 2025
1 parent f62f339 commit 0896c04
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Request Screenshot or Video

on:
pull_request:
types:
- opened

permissions:
pull-requests: write

jobs:
comment_on_pr:
name: Request Screenshot/Video
runs-on: ubuntu-latest

steps:
- name: Comment on the PR
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { context } = require("@actions/github");
const prNumber = context.payload.pull_request.number;
const owner = context.payload.repository.owner.login;
const repo = context.payload.repository.name;
const message = `
👋 Hello @${context.payload.pull_request.user.login}, thank you for opening this pull request!
To help with the review process, could you please attach a **screenshot** or a **video** demonstrating the changes you've made? This will make it easier for reviewers to understand the impact of your contribution.
Thank you for your efforts! 🚀
`;
await github.issues.createComment({
owner: owner,
repo: repo,
issue_number: prNumber,
body: message
});

0 comments on commit 0896c04

Please sign in to comment.