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

chore(ci): bump package version after release via pull request #2239

Conversation

heitorlessa
Copy link
Contributor

Issue number: #2210

DEPENDENCY: #2238

Summary

Use new create-pr action introduced in #2238 to bump package version via PR instead of pushing directly to develop as part of the release.

Changes

Please provide a summary of what's being changed

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
@heitorlessa heitorlessa requested a review from a team as a code owner May 11, 2023 13:20
@heitorlessa heitorlessa requested review from leandrodamascena and removed request for a team May 11, 2023 13:20
@boring-cyborg boring-cyborg bot added the github-actions Pull requests that update Github_actions code label May 11, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 11, 2023
@github-actions github-actions bot added the internal Maintenance changes label May 11, 2023
@heitorlessa heitorlessa mentioned this pull request May 11, 2023
20 tasks
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

I just left a comment about permissions, but for everything else, this looks good!

Comment on lines 146 to 147
contents: write
pull-requests: write
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these permissions not conflicting with each other? I think the pull-requests: write permission is enough for that, no? The contents: write permission seems to be much broader and allows things we don't need.

References:
https://docs.github.com/en/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#pull-requests
https://docs.github.com/en/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#contents

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not in this case :)

create-pr action needs to create a temporary branch to push these staged files (pyproject.toml) - hence contents: write. Then, creates a PR against develop using our temporary branch as the HEAD - hence pull-requests: write

@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 12, 2023
bump_version:
needs: [build, release]
permissions:
contents: write
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
contents: write
contents: write # create-pr action creates a temporary branch

Signed-off-by: Heitor Lessa <lessa@amazon.nl>
Signed-off-by: Heitor Lessa <lessa@amazon.nl>
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

LGTM!

@leandrodamascena leandrodamascena merged commit 5850aa8 into aws-powertools:develop May 12, 2023
3 checks passed
heitorlessa added a commit to heitorlessa/aws-lambda-powertools-python that referenced this pull request May 12, 2023
* develop:
  chore(ci): bump package version after release via pull request (aws-powertools#2239)
  chore(ci): convert create-pr steps into composite action (aws-powertools#2238)
  chore(ci): changelog rebuild (aws-powertools#2241)
  chore(deps-dev): bump aws-cdk from 2.78.0 to 2.79.0 (aws-powertools#2235)
  docs(batch_processing): snippets split, improved, and lint (aws-powertools#2231)
  chore(deps-dev): bump mypy from 1.2.0 to 1.3.0 (aws-powertools#2233)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-actions Pull requests that update Github_actions code internal Maintenance changes size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants