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

Write github actions needed for auto closing issues opened beyond core #639

Merged
merged 4 commits into from
Oct 16, 2023

Conversation

FelonEkonom
Copy link
Member

Relates to #622

@FelonEkonom FelonEkonom requested a review from mat-hek as a code owner October 12, 2023 14:09
@FelonEkonom FelonEkonom added the no-changelog This label has to be added if changes from the PR are not meant to be placed in the CHANGELOG.md label Oct 12, 2023
@FelonEkonom FelonEkonom requested a review from mkaput October 14, 2023 13:05
@FelonEkonom FelonEkonom changed the title Write github actions necessary for auto closing issues beyond core Write github actions needed for auto closing issues opened beyond core Oct 14, 2023
@FelonEkonom FelonEkonom force-pushed the auto-closing-issues-beyond-core branch from c81634e to 35fec8b Compare October 14, 2023 13:20
.github/actions/close_issue/action.yml Outdated Show resolved Hide resolved
run: |
gh issue edit $ISSUE_URL --add-project "Smackore" --add-label closed-by-membrane-bot
sleep 10
export TICKET_ID=$(gh project item-list 19 --owner membraneframework --format json --limit 10000000 | elixir get_ticket_id.exs "$ISSUE_URL" | awk '/TICKET_ID/{print $2}')
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export TICKET_ID=$(gh project item-list 19 --owner membraneframework --format json --limit 10000000 | elixir get_ticket_id.exs "$ISSUE_URL" | awk '/TICKET_ID/{print $2}')
export TICKET_ID=$(gh project item-list 19 --owner membraneframework --format json --limit 10000000 | elixir get_ticket_id.exs "$ISSUE_URL")

why not just print ticket id without unnecessary stuff?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because .exs script sometimes prints also logs from Mix.install/1, like Resolving Hex dependencies...

Copy link
Member

Choose a reason for hiding this comment

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

So that's another reason not to go with Elixir here ;)

Copy link
Member

Choose a reason for hiding this comment

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

You could set MIX_QUIET=1, though it seems it doesn't work for Mix.install :P It may be worth to report an issue though

.github/actions/close_issue/action.yml Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Python is preinstalled in GH actions, why not just use it or jq ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean to use it instead of elixir?

Copy link
Member

Choose a reason for hiding this comment

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

yes, setup-elixir is just an unnecessary cost here

Copy link
Member Author

@FelonEkonom FelonEkonom Oct 16, 2023

Choose a reason for hiding this comment

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

But does this cost hurt us anyhow?

Copy link
Member

Choose a reason for hiding this comment

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

Frustration that action is working longer than it should. I don't think you'll saturate concurrency limits, given this runs on Linux runners only.

@FelonEkonom FelonEkonom requested a review from mkaput October 16, 2023 10:14
Copy link
Member

@mkaput mkaput left a comment

Choose a reason for hiding this comment

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

I'm leaving the issue of this script being written in Elixir to you. I'm not the owner of this code, so I'm not clicking accept, but this looks okay-ish to my eyes.

@FelonEkonom FelonEkonom merged commit 9943f16 into master Oct 16, 2023
1 check passed
@FelonEkonom FelonEkonom deleted the auto-closing-issues-beyond-core branch October 16, 2023 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog This label has to be added if changes from the PR are not meant to be placed in the CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants