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

Feature: Twitter release announcement #174

Closed
wants to merge 53 commits into from
Closed

Feature: Twitter release announcement #174

wants to merge 53 commits into from

Conversation

ghostwriter
Copy link
Contributor

This patch resolves #24 (supersedes #129), via the following changes:

  • Add abraham/twitteroauth
  • Add Github CLI to Docker
  • Update example workflows
  • Update dependencies
  • Automatically extract and publish custom tweets from the milestone description.
  • Automatically generate and publish default tweet

The tweet will be extracted from the milestone description if a tweet markdown code block matches:

``` tweet
The announcement tweet goes here.
```

If one is not found, it will create a default tweet.

Released: {repository} {version} https://github.com/{repository}/releases/tag/{version}

Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
We can use it to simplify the git setup and GitHub operations.

Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
@froschdesign
Copy link
Member

The tweet will be extracted from the milestone description if a tweet markdown code block matches:

The announcement tweet goes here.

So far, the releases of all packages have shown that the milestone descriptions are used very rarley.
Therefore I suggest to use a label for issues and pull requests like "New Feature" which can be extract and used for an announcement.

I also suggest not to use "tweet" here but something more general like "announcement" or "notice". If there is a new service or another hip provider tomorrow, then it would have to be changed.

@ghostwriter
Copy link
Contributor Author

So far, the releases of all packages have shown that the milestone descriptions are used very rarley. Therefore I suggest to use a label for issues and pull requests like "New Feature" which can be extract and used for an announcement.

How would you format the announcement, when using labels?

  • keep in mind twitter's arbitrary 140 280 character limit.
  • keep in mind twitter's arbitrary URL of any length will be shortened to 23 characters.

I personally prefer having full control of the announcement, by simply updating the milestone description once rather than tracking down multiple PRs to add labels and making sure each PR has a proper title.

I also suggest not to use "tweet" here but something more general like "announcement" or "notice". If there is a new service or another hip provider tomorrow, then it would have to be changed.

This implementation adds Publish a Tweet on release. Using the Announcement and Publish interface.

namespace Laminas\AutomaticReleases\Announcement\Contracts
interface Announcement
{
    public function __toString(): string;
    public static function fromMilestone(Milestone $milestone): self;
}
interface Publish
{
    public function __invoke(Announcement $message): void;
}

with the intention of adding discord, slack (via webhooks) later. That's why tweet is used here.

@froschdesign
Copy link
Member

How would you format the announcement, when using labels?

  • keep in mind twitter's arbitrary 280 character limit.
  • keep in mind twitter's arbitrary URL of any length will be shortened to 23 characters.

Right, it is limited but you also must count the characters if you write the message by hand.

Short and concise titles can be used for new features and these can be added as first lines for the release notes. GitHub already use the first lines for tweets:

<meta name="twitter:description" content="Release Notes for 4.5.1
4.5.x bugfix release (patch)
4.5.1

Total issues resolved: 0
Total pull requests resolved: 1
Total contributors: 1

Bug

124: Fixed deprecated null parameter in trim() call ..." />

https://github.com/laminas/laminas-code/releases/tag/4.5.1

…with the intention of adding discord, slack (via webhooks) later.

I see no need for these channels, not for the Laminas project.

Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
Signed-off-by: Nathanael Esayeas <[email protected]>
@ghostwriter
Copy link
Contributor Author

How would you format the announcement, when using labels?

  • keep in mind twitter's arbitrary 280 character limit.
  • keep in mind twitter's arbitrary URL of any length will be shortened to 23 characters.

Right, it is limited but you also must count the characters if you write the message by hand.

Short and concise titles can be used for new features and these can be added as first lines for the release notes. GitHub already use the first lines for tweets:

<meta name="twitter:description" content="Release Notes for 4.5.1
4.5.x bugfix release (patch)
4.5.1

Total issues resolved: 0
Total pull requests resolved: 1
Total contributors: 1

Bug

124: Fixed deprecated null parameter in trim() call ..." />

https://github.com/laminas/laminas-code/releases/tag/4.5.1

No, the meta tag with the name="twitter:description" is not a tweet. It is a meta tag for Twitter cards. It is used by Twitter to generate this card when someone posts that link on Twitter.

img

``` tweet
We did it! v1.0.0 https://github.com/vendor/project/releases/tag/1.0.0
BTW! Our docs have moved! https://github.com/vendor/project/blob/1.0.0/docs
Please consider sponsoring to ensure the future of the packages we maintain. https://github.com/sponsors/vendor
```

I assumed the "Announcement" is something like eg; ^


…with the intention of adding discord, slack (via webhooks) later.

I see no need for these channels, not for the Laminas project.

That is not the point. I'm pointing out that the interfaces created the abstractions.

I guess it's a no to adding slack to notify the webhook/channel when a release fails (with error logs).

@froschdesign
Copy link
Member

@ghostwriter

No, the meta tag with the name="twitter:description" is not a tweet. It is a meta tag for Twitter cards. It is used by Twitter to generate this card when someone posts that link on Twitter.

Right, it is used in tweets, something else was not meant
here.

We did it! v1.0.0 https://github.com/vendor/project/releases/tag/1.0.0
BTW! Our docs have moved! https://github.com/vendor/project/blob/1.0.0/docs
Please consider sponsoring to ensure the future of the packages we maintain. https://github.com/sponsors/vendor

I assumed the "Announcement" is something like eg; ^

Also right, but I think there is a misunderstanding here, because I am not against the implementation, only that so far individual text is very rarely used in the milestone descriptions.

Therefore I suggest to improve the generation of the release notes which results in a better Twitter card. And one suggestion for this improvement is the use of a label for new features which can be added to issue reports and pull request and then rendered in the first lines of the milestone description. An individual text is then not necessarily needed because the Twitter card already covers everything important.

However, this does not mean that the possibility to add an individual text should not be given.

I guess it's a no to adding slack to notify the webhook/channel when a release fails (with error logs).

Correct, it is already here on GitHub.

@ghostwriter
Copy link
Contributor Author

ghostwriter commented Dec 20, 2021

@ghostwriter

No, the meta tag with the name="twitter:description" is not a tweet. It is a meta tag for Twitter cards. It is used by Twitter to generate this card when someone posts that link on Twitter.

Right, it is used in tweets, something else was not meant here.

We did it! v1.0.0 https://github.com/vendor/project/releases/tag/1.0.0
BTW! Our docs have moved! https://github.com/vendor/project/blob/1.0.0/docs
Please consider sponsoring to ensure the future of the packages we maintain. https://github.com/sponsors/vendor

I assumed the "Announcement" is something like eg; ^

Also right, but I think there is a misunderstanding here, because I am not against the implementation, only that so far individual text is very rarely used in the milestone descriptions.

this is why I chose milestone descriptions as a good candidate for storing the Twitter announcement, "so far individual text is very rarely used in the milestone descriptions.". (no BC)

Therefore I suggest to improve the generation of the release notes which results in a better Twitter card. And one suggestion for this improvement is the use of a label for new features which can be added to issue reports and pull request and then rendered in the first lines of the milestone description. An individual text is then not necessarily needed because the Twitter card already covers everything important.

the current "Twitter card" <meta> tag generated by GitHub is the contents of the release note, that is generated via jwage/changelog-generator, which is completely different from a tweet(Twitter Announcement) that is "automatically generated" or "scheduled" via milestone description to be tweeted on release.

are you asking me to "improve" the output of jwage/changelog-generator or phly/keep-a-changelog?

if so, this patch is meant to automatically post tweets. out of scope, no?

However, this does not mean that the possibility to add an individual text should not be given.

I guess it's a no to adding slack to notify the webhook/channel when a release fails (with error logs).

Correct, it is already here on GitHub.

cool, I'll set some time to learn more about that. (read: actions and or error logs expire on GitHub, per user/org level. fun.)

@ghostwriter
Copy link
Contributor Author

closing, lost interest.


Wanted to be an active contributor.

Asked to be nominated to help Maintainers. (ignored)

Asked for input and feedback regarding issues and pull requests. (ignored)

Contributors Time, Skills, and FREE Labor wasted. (PRs are ignored for months, then closed.)

  • Discourage and drive away contributors.

@ghostwriter ghostwriter deleted the feature/twitter-release-announcement branch February 13, 2022 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate release announcement on twitter
2 participants