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

Replaced cURL slack workflows with slackapi #3577

Merged
merged 34 commits into from
Jan 9, 2024
Merged

Conversation

The5cheduler
Copy link
Contributor

Fixes

Fixes #3461 by @dhruvkb

Description

replaced the cURL with slackapi for github-actions to make it more aligned and maintainable.

Testing Instructions

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@The5cheduler The5cheduler requested a review from a team as a code owner December 21, 2023 23:54
@openverse-bot openverse-bot added 🟩 priority: low Low priority and doesn't need to be rushed ✨ goal: improvement Improvement to an existing user-facing feature 🤖 aspect: dx Concerns developers' experience with the codebase 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels Dec 21, 2023
@sarayourfriend sarayourfriend added the 🧱 stack: mgmt Related to repo management and automations label Dec 22, 2023
Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

LGTM and thanks for the contribution! Can you run the linting (just lint) locally and commit the changes? That way this will pass CI and we'll be able to merge it.

Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution and agree with @sarayourfriend about linting. Just wanted to bring your attention to the file you possibly missed: https://github.com/WordPress/openverse/blob/ca35fa5f23d05575e78774ddc9a58c1b671aca2a/.github/workflows/pr_limit_reminders.yml?

@The5cheduler The5cheduler marked this pull request as draft December 22, 2023 23:57
@obulat obulat removed the 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work label Dec 26, 2023
Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

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

There should be a new line at the end of each file

.github/workflows/discussion_ping.yml Outdated Show resolved Hide resolved
.github/workflows/pr_limit_reminders.yml Outdated Show resolved Hide resolved
.github/workflows/pr_ping.yml Outdated Show resolved Hide resolved
@The5cheduler
Copy link
Contributor Author

Thank you so much @obulat and @dhruvkb.
I got little busy with holidays so was not able to make changes you requested.
Thank you so much for applying changes on my behalf.

Best,
Pk Patel

@The5cheduler The5cheduler marked this pull request as ready for review December 26, 2023 22:29
Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

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

Thanks for the continue to collaborate on this @The5cheduler! The code needs some additional work to fix the errors. I've labelled them in 2 files but the changes will apply to all 3.

I'm sorry we focused more on fixing linting issues before actual problems.

.github/workflows/discussion_ping.yml Outdated Show resolved Hide resolved
uses: slackapi/[email protected]
with:
payload: |
{"user": "'"$slack_id"'","message": "'"$msg"'"}
Copy link
Member

Choose a reason for hiding this comment

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

Here $msg is not defined. You can copy the message text from before and paste it here. Also the payload is regular YAML so the quote interpolations "'" are not needed here.

Suggested change
{"user": "'"$slack_id"'","message": "'"$msg"'"}
{
"user": "${{ env.slack_id }}",
"message": "<actual message from before>"
}

Also the same note about environment variables as the other review comment.

@The5cheduler The5cheduler marked this pull request as ready for review December 31, 2023 21:08
Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @The5cheduler 🙏 It all looks good except on significant but easy to miss detail about how GitHub Action variables work. I've left a comment explaining the required change, and then this should be good-to-go, I think 😁

.github/workflows/pr_ping.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

Brilliant, thank you @The5cheduler 🎉

@sarayourfriend sarayourfriend requested a review from dhruvkb January 3, 2024 00:29
@The5cheduler The5cheduler requested a review from obulat January 3, 2024 13:16
@openverse-bot
Copy link
Collaborator

Based on the low urgency of this PR, the following reviewers are being gently reminded to review this PR:

@obulat
@dhruvkb
This reminder is being automatically generated due to the urgency configuration.

Excluding weekend1 days, this PR was ready for review 6 day(s) ago. PRs labelled with low urgency are expected to be reviewed within 5 weekday(s)2.

@The5cheduler, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings.

Footnotes

  1. Specifically, Saturday and Sunday.

  2. For the purpose of these reminders we treat Monday - Friday as weekdays. Please note that the operation that generates these reminders runs at midnight UTC on Monday - Friday. This means that depending on your timezone, you may be pinged outside of the expected range.

Copy link
Member

@krysal krysal left a comment

Choose a reason for hiding this comment

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

Fantastic, @The5cheduler. Thank you!

@krysal krysal dismissed dhruvkb’s stale review January 9, 2024 17:35

Review comments were addressed.

@krysal krysal merged commit fa632e6 into WordPress:main Jan 9, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase ✨ goal: improvement Improvement to an existing user-facing feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: mgmt Related to repo management and automations
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Replace cURL to Slack with slackapi/slack-github-action
6 participants