Skip to content
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

Enhance: Add Bluesky share link to merge message #91659

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
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
26 changes: 17 additions & 9 deletions .github/workflows/auto-pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,25 @@ jobs:


const getMergeMessage = (username) => {
const greeting = `Hello @${username}, congratulations! You've successfully submitted a pull request. 🎉`;
const starRepoMessage = `If you liked the tutorial, please star this repo by clicking the star button on the top right of this page. <img alt="star screenshot" title="star button" src="https://firstcontributions.github.io/assets/star.png">`;

const nextSteps = `# Next steps \n - Continue contributing: If you're looking for projects to contribute to, checkout our [<img src="${repo_logo}" width="22" title="web app" /> webapp](${web_url}). \n - Join our Slack group: We have a community to help/support contributors. [<img src="${slack_logo}" width="22" title="Slack" /> Join slack group](${slack_invite_url}). \n - Share on social media: You can share this content to help more people. [ <img alt="twitter" title="twitter" src="${twitter_logo}" width="22"> tweet](${twitter_tweet_share}). [<img alt="twitter" title="twitter" src="${fb_logo}" width="22"> share](${fb_share_link}). [ <img alt="reddit" title="reddit" src="${reddit_logo}" width="22"> share](${reddit_link}). [<img alt="linkedin" title="linkedin" src="${linkedin_logo}" width="22"> post](${linkedin_share_link}). [<img alt="devio" title="devio" src="${dev_logo}" width="22"> publish](${dev_share_link}). [<img src="${hackernews_logo}" width="22" title="HackerNews" /> Post on HackerNews](${hackernews_share_link}).`;
const feedbackMessage = `We'd love to hear your thoughts about this project. Let us know how we can improve by commenting or opening an issue here.`;

const gif = `![celebration gif](${getRandomGif()})`;

return `${greeting}\n\n${starRepoMessage}\n\n${nextSteps}\n\n${feedbackMessage}\n\n${gif}`;
const greeting = `Hello @${username}, congratulations! You've successfully submitted a pull request. 🎉`;
const starRepoMessage = `If you liked the tutorial, please star this repo by clicking the star button on the top right of this page. <img alt="star screenshot" title="star button" src="https://firstcontributions.github.io/assets/star.png">`;

const nextSteps = `# Next steps
- Continue contributing: Check out our [<img src="${repo_logo}" width="22" title="web app" /> webapp](${web_url}).
- Join our Slack group: [<img src="${slack_logo}" width="22" title="Slack" /> Join Slack group](${slack_invite_url}).
- Share on social media:
- [<img src="https://cdn.jsdelivr.net/npm/supertinyicons/icons/twitter.svg" width="22" title="Twitter" /> Share on Twitter](https://twitter.com/intent/tweet?text=I+just+contributed+to+First+Contributions!+Check+it+out:+https://github.com/firstcontributions/first-contributions+%23OpenSource+%23FirstContributions)
Copy link
Member

@Roshanjossey Roshanjossey Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting looks correct now, but now we're missing a few options we had before (dev.to, hackernews, facebook)

We have the links and logos declared above. Lines 95 to 115. Could you please reuse those.

I think it would be good if Bluesky share is the first one.

Also, could you please test the workflow on your fork and share that PR in comments?

- [<img src="https://cdn.jsdelivr.net/npm/supertinyicons/icons/linkedin.svg" width="22" title="LinkedIn" /> Share on LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https://github.com/firstcontributions/first-contributions&title=I+just+contributed+to+First+Contributions!+%23OpenSource+%23FirstContributions)
- [<img src="https://cdn.jsdelivr.net/npm/supertinyicons/icons/bluesky.svg" width="22" title="Bluesky" /> Share on Bluesky](https://bsky.app/intent/tweet?text=I+just+contributed+to+First+Contributions!+Check+it+out:+https://github.com/firstcontributions/first-contributions+%23OpenSource+%23FirstContributions)`;

const feedbackMessage = `We'd love to hear your thoughts about this project. Let us know how we can improve by commenting or opening an issue here.`;

const gif = `![celebration gif](${getRandomGif()})`;

return `${greeting}\n\n${starRepoMessage}\n\n${nextSteps}\n\n${feedbackMessage}\n\n${gif}`;
}


// Generate the merge message using the getMergeMessage function
const message = getMergeMessage(context.payload.pull_request.user.login);

Expand Down