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

More friendly first tip message #185

Merged
merged 3 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion src/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ describe("Utility functions", () => {
if (!("error" in result)) {
throw new Error("Expected error message not found.");
}
expect(result.error).toMatch("Contributor did not properly post their account address");
expect(result.error).toMatch(
"Hey 👋, thanks for your contribution. We offer to propose a tip for you to OpenGov",
);
});

test("Throws on invalid network", () => {
Expand Down
9 changes: 8 additions & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ export function parseContributorAccount(bodys: (string | null)[]): ContributorAc
}

return {
error: `Contributor did not properly post their account address.\n\nMake sure the pull request description (or user bio) has: "{network} address: {address}".`,
error: `Hey 👋, thanks for your contribution. We offer to propose a tip for you to OpenGov 🤩

You can pick between DOT or KSM. Please put either your Polkadot or Kusama address into the Pull Request description or your GitHub bio.
The format should be like this: \`{network} address: {address}\`
Just replace \`{network}\` with either ${Object.keys(validNetworks).join(", ")} and \`{address}\` with your actual address.

You still need to claim the tip after it was approved by OpenGov;
please check the [Contributing docs](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Tip) for help.`,
};
}

Expand Down
Loading