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

ci: Automated merge-by comments and table #3090

Merged
merged 10 commits into from
Sep 5, 2024
Merged

ci: Automated merge-by comments and table #3090

merged 10 commits into from
Sep 5, 2024

Conversation

traeok
Copy link
Member

@traeok traeok commented Sep 4, 2024

Proposed changes

Adds two new workflows to the .github folder of the repo:

  • merge-by-comments.yml
    • posts merge-by dates when a new PR is opened (not in draft state) or marked as ready, as well as for existing PRs (before this workflow) once a new change is pushed
    • check the comment below by github-actions[bot] to see it in action 😋
  • merge-by-table.yml
    • updates a PR Status List in the Discussions tab with PRs that have a merge-by date <= 1 week away
    • posts a reminder on open PRs with merge-by dates <24 hours away, tagging attached reviewers who haven't yet approved

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds or improves functionality)
  • Breaking change (a change that would cause existing functionality to not work as expected)
  • Documentation (Markdown, README updates)
  • Other (please specify above in "Proposed changes" section)

Checklist

General

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok marked this pull request as ready for review September 4, 2024 15:44
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok marked this pull request as draft September 4, 2024 15:48
@traeok traeok marked this pull request as ready for review September 4, 2024 15:48
Copy link

github-actions bot commented Sep 4, 2024

📅 Suggested merge-by date: 9/18/2024

Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok marked this pull request as draft September 4, 2024 15:50
@traeok traeok marked this pull request as ready for review September 4, 2024 15:50
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok marked this pull request as draft September 4, 2024 15:53
@traeok traeok marked this pull request as ready for review September 4, 2024 15:53
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok marked this pull request as draft September 4, 2024 17:11
@traeok traeok marked this pull request as ready for review September 4, 2024 17:11
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok marked this pull request as draft September 4, 2024 17:48
@traeok traeok marked this pull request as ready for review September 4, 2024 17:48
@traeok traeok added the no-changelog Add to PR's that don't require a CHANGELOG update label Sep 4, 2024
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
@traeok traeok marked this pull request as draft September 4, 2024 18:07
@traeok traeok marked this pull request as ready for review September 4, 2024 18:07
Copy link

sonarqubecloud bot commented Sep 4, 2024

@JillieBeanSim
Copy link
Contributor

Hey @traeok this is looking really cool. One question, why is the Update GitHub Project / Move project item (pull_request_target) check failing?

@traeok
Copy link
Member Author

traeok commented Sep 5, 2024

Hey @traeok this is looking really cool. One question, why is the Update GitHub Project / Move project item (pull_request_target) check failing?

Thanks Billie! This is because the token used for that action needs to have its permissions updated so it has write permission for pull requests. I was going to update it myself, but unfortunately the token permissions are restricted to a few users in the org and I do not have the necessary access to change them.

@zFernand0
Copy link
Member

Hey @traeok this is looking really cool. One question, why is the Update GitHub Project / Move project item (pull_request_target) check failing?

Thanks Billie! This is because the token used for that action needs to have its permissions updated so it has write permission for pull requests. I was going to update it myself, but unfortunately the token permissions are restricted to a few users in the org and I do not have the necessary access to change them.

I was looking into this from the CLI perspective, but decided to move the investigation/test to a fork:

More details, the token used for this specific action is the Zowe-Robot-token, which was created using the classic token method instead of fine-grained PATs. With classic tokens, the level of permission might be a bit too broad so we may be forced to create more fine-grained PATs going forward 😢

Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

Seem like to learned a lot of graphQL 😋
LGTM! 🥳

@zFernand0 zFernand0 merged commit b818916 into main Sep 5, 2024
11 of 13 checks passed
@zFernand0 zFernand0 deleted the actions/mergeby branch September 5, 2024 14:58
@JillieBeanSim
Copy link
Contributor

JillieBeanSim commented Sep 5, 2024

If it's not working why did it get approved and merged? @traeok @zFernand0 @awharn
FYI @adam-wolfe

@awharn
Copy link
Member

awharn commented Sep 5, 2024

I can't speak for why it was merged, but that check is failing across the entire org right now because someone changed Zowe's default permissions for the GITHUB_TOKEN to be read only in the workflows. We are in the process of opening pull requests in all of our repos to update all the workflows. It should be unrelated to the changes made here. That workflow is what updates the PRs and Issues on the project board on our standups. @JillieBeanSim

@zFernand0
Copy link
Member

The Update project / Move Project Item workflow is not something required before a PR can be merged.
if those fail, it just means that the Projects tab on GitHub may be a bit out of date. However, I think it's ok for now since we update the board on every standup anyways 😋

@JillieBeanSim
Copy link
Contributor

I understand the possibility of glitches/failures on existing workflows but it's not good practice to introduce new items (code, workflows, etc.) into the code base if not working during the time of introduction.

@JillieBeanSim
Copy link
Contributor

@traeok please port these changes to the next branch. Thanks

@JillieBeanSim JillieBeanSim added the needs-ported Apply to issues or PRs that need ported label Sep 5, 2024
@zFernand0
Copy link
Member

zFernand0 commented Sep 5, 2024

I understand the possibility of glitches/failures on existing workflows but it's not good practice to introduce new items (code, workflows, etc.) into the code base if not working during the time of introduction.

Hey @JillieBeanSim,
I understand the concern, however these workflows (Update/Move Project Item) were added a little while ago, and started failing (I believe on August 28th) due to some setting changing at a higher level than the Zowe GH Org itself 😢

I'm more than happy to provide more details on a quick call if needed. 😋

@t1m0thyj t1m0thyj removed the needs-ported Apply to issues or PRs that need ported label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Add to PR's that don't require a CHANGELOG update size/L
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

5 participants