Skip to content

Commit 4bfed24

Browse files
Update auto-comment.yml
1 parent ea89451 commit 4bfed24

File tree

1 file changed

+62
-30
lines changed

1 file changed

+62
-30
lines changed

β€Ž.github/workflows/auto-comment.ymlβ€Ž

Lines changed: 62 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
name: "Auto-Comment on Nomination Issues"
23
on:
34
issues:
@@ -7,51 +8,82 @@ jobs:
78
comment-on-issue:
89
runs-on: ubuntu-latest
910
steps:
10-
- name: Add Welcome Comment for Nominations Only
11+
- name: Add Welcome Comment Based on Program
1112
uses: actions/github-script@v6
1213
with:
1314
github-token: ${{ secrets.GITHUB_TOKEN }}
1415
script: |
1516
const issue = context.payload.issue;
1617
const labels = issue.labels.map(label => label.name.toLowerCase());
18+
const issueNumber = issue.number;
19+
const repoOwner = context.repo.owner;
20+
const repoName = context.repo.repo;
1721
18-
// Only proceed if the issue has the "nomination" label
19-
if (!labels.includes("nomination")) {
20-
console.log("Skipping: Issue is not a nomination.");
21-
return;
22-
}
23-
24-
let programName = "PyTorch Foundation Programs";
22+
let programName = "PyTorch Foundation Program";
2523
let programDocs = "https://github.com/pytorch-fdn/foundation-programs";
24+
let commentBody = "";
2625
2726
if (labels.includes("ambassador")) {
2827
programName = "PyTorch Ambassador Program";
29-
programDocs = "https://github.com/pytorch-fdn/foundation-programs/blob/main/pytorch-ambassador-program.md";
30-
} else if (labels.includes("ospo-outreach")) {
31-
programName = "OSPO Outreach Program";
32-
programDocs = "https://github.com/pytorch-fdn/foundation-initiative/blob/main/osp-outreach.md";
28+
programDocs = "https://github.com/pytorch-fdn/foundation-programs/blob/main/ambassador/README.md";
29+
commentBody = [
30+
`πŸ‘‹ Thank you for submitting a nomination for the **${programName}**! πŸŽ‰`,
31+
"",
32+
"Your nomination is currently under review. A team member will evaluate the submission and update the status accordingly.",
33+
"",
34+
"πŸ”Ή **Review Process & Next Steps:**",
35+
"1️⃣ Initial Review – The nomination will be reviewed by the team.",
36+
"2️⃣ One-on-One Review – If shortlisted, the nominee will have a session with the Executive Director.",
37+
"3️⃣ Ranking & Selection – Reviewers will assign scores based on eligibility and impact.",
38+
"4️⃣ Final Decision – Selected ambassadors will receive an **official invitation**. βœ…",
39+
"",
40+
`πŸ“– Program Details: [View Documentation](${programDocs})`,
41+
"",
42+
"πŸ’¬ Have questions? Please submit a [Feedback or Inquiry](https://github.com/pytorch-fdn/foundation-initiative/issues/new?template=feedback.yml) and reference this nomination issue number.",
43+
"",
44+
"Thank you for helping grow the PyTorch community! πŸš€"
45+
].join("\n\n");
3346
} else if (labels.includes("speakers-bureau")) {
3447
programName = "Speakers Bureau Program";
35-
programDocs = "https://github.com/pytorch-fdn/foundation-initiative/blob/main/speakers-bureau.md";
48+
programDocs = "https://github.com/pytorch-fdn/foundation-programs/blob/main/speakers-bureau/README.md";
49+
commentBody = [
50+
`πŸ‘‹ Thank you for submitting a nomination for the **${programName}**! 🎀`,
51+
"",
52+
"Your nomination is currently being reviewed. A team member will evaluate the speaker’s background, proposed topics, and fit for upcoming events.",
53+
"",
54+
`πŸ“– Program Details: [View Documentation](${programDocs})`,
55+
"",
56+
"πŸ’¬ Have questions? Please submit a [Feedback or Inquiry](https://github.com/pytorch-fdn/foundation-initiative/issues/new?template=feedback.yml) and reference this issue.",
57+
"",
58+
"We appreciate your effort to support PyTorch education and visibility worldwide! 🌍"
59+
].join("\n\n");
60+
} else if (labels.includes("ospo-outreach")) {
61+
programName = "OSPO Outreach Program";
62+
programDocs = "https://github.com/pytorch-fdn/foundation-programs/blob/main/ospo-outreach/README.md";
63+
commentBody = [
64+
`πŸ‘‹ Thank you for your submission to the **${programName}**! πŸ§ͺ`,
65+
"",
66+
"Your outreach proposal is under review. The team will evaluate the research goals, scope, and alignment with PyTorch Foundation priorities.",
67+
"",
68+
`πŸ“– Program Details: [View Documentation](${programDocs})`,
69+
"",
70+
"πŸ’¬ Have questions? Please submit a [Feedback or Inquiry](https://github.com/pytorch-fdn/foundation-initiative/issues/new?template=feedback.yml) and reference this issue.",
71+
"",
72+
"Thank you for advancing open-source AI and ML innovation with us! 🀝"
73+
].join("\n\n");
74+
} else {
75+
commentBody = [
76+
`πŸ‘‹ Thank you for submitting to the **${programName}**!`,
77+
"",
78+
`Your submission is under review. Please refer to our [documentation](${programDocs}) for next steps.`,
79+
"",
80+
"If you have questions, submit a [Feedback Issue](https://github.com/pytorch-fdn/foundation-initiative/issues/new?template=feedback.yml) and include this issue number."
81+
].join("\n\n");
3682
}
3783
38-
const commentBody = `πŸ‘‹ Thank you for submitting a nomination for the **${programName}**! πŸŽ‰\n\n
39-
Your nomination is currently under review. A team member will evaluate the submission and update the status accordingly.\n\n
40-
πŸ”Ή **Review Process & Next Steps:**\n
41-
1️⃣ **Initial Review** - The nomination will be reviewed by the team.
42-
2️⃣ **One-on-One Review** - If shortlisted, the nominee will have a session with the Executive Director.
43-
3️⃣ **Ranking & Selection** - Nominees will be ranked based on eligibility & impact.
44-
4️⃣ **Final Decision** - Selected ambassadors will receive an **official invitation**. βœ…\n\n
45-
πŸ“– **Program Details & Requirements:** [Read More Here](https://github.com/pytorch-fdn/foundation-programs/blob/main/pytorch-ambassador-program.md)\n\n
46-
πŸ’¬ **Have questions about your nomination?**
47-
Please submit a [Feedback or Inquiry](https://github.com/pytorch-fdn/foundation-initiative/issues/new?template=feedback.yml) and reference this issue number in the description.
48-
This helps us keep nomination threads focused on the review process. πŸ™\n\n
49-
Thank you for helping grow the PyTorch community! πŸš€`;
50-
5184
await github.rest.issues.createComment({
52-
owner: context.repo.owner,
53-
repo: context.repo.repo,
54-
issue_number: issue.number,
85+
owner: repoOwner,
86+
repo: repoName,
87+
issue_number: issueNumber,
5588
body: commentBody
5689
});
57-

0 commit comments

Comments
Β (0)