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

Action:Automatic pull request labeler #2291

Merged
merged 7 commits into from
Oct 3, 2022
Merged

Action:Automatic pull request labeler #2291

merged 7 commits into from
Oct 3, 2022

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Sep 27, 2022

This PR automatically adds GitHub labels to PRs where it's safe to assume their intent.

Some examples are PRs that:

  • Only change documentation files.
  • Only change test files.
  • Only change release-related files.
  • Changes files in a specific product directory (e.g. ci, profiling).

@marcotc marcotc added the dev/github Github repository maintenance and automation label Sep 27, 2022
@marcotc marcotc requested a review from a team September 27, 2022 00:39
Copy link
Member

@ivoanjo ivoanjo 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 being our GitHub wizard and pushing our automation forward :)

.github/labeler.yml Outdated Show resolved Hide resolved
.github/labeler.yml Outdated Show resolved Hide resolved
Comment on lines 36 to 38
# Version bump pull request
release:
- all: [ '{CHANGELOG.md,lib/ddtrace/version.rb,gemfiles/**}' ]
Copy link
Member

Choose a reason for hiding this comment

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

Really minor: Since we've done a few releases where we didn't bump all the gemfiles, I wonder if it would make sense to relax this rule to take that into account.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is that so? When a release is done at least ddtrace (x.y.z) should get an update in the lockfiles, correct?

Copy link
Member

Choose a reason for hiding this comment

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

Yes and no. The way we've set up CI is that the CI runners will do the update locally anyway, thus we can actually not update it and things will still be fine.

But we do want the lockfiles to be updated from time to time, so this is why we have it as a step of the release process.

So my question/suggestion was more of a: should we consider here the exceptional cases where we do a release and skip the lockfile update?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm removing gemfile bump from this list, to ensure we have no false positives on the release tag.


# Changes to Tracing integrations
integrations:
- any: [ 'lib/datadog/tracing/contrib/**' ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be 'lib/datadog/appsec/contrib/**' here too? Maybe `'lib/datadog/ci/contrib/**' as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also should there be a general tracing one as well?

tracing:
  - any: [ 'lib/datadog/tracing/**' ]

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what the behaviour is when multiple criteria apply (e.g resulting in AppSec+Integrations tags, which sounds good to me if someone changes AppSec integration code).

Copy link
Contributor

Choose a reason for hiding this comment

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

Also this non-product one sounds OK to me as well:

core:
  - any: [ 'lib/datadog/core/**' ]

Copy link
Member Author

Choose a reason for hiding this comment

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

Applied all 3 suggested changes.


# Changes to CI-App
ci-app:
- any: [ 'lib/datadog/ci/**' ]
Copy link

@kachkaev kachkaev Oct 3, 2022

Choose a reason for hiding this comment

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

Thanks for giving my fork a go @marcotc! Does this glob work the same as lib/datadog/ci/**/*? I can update docs in actions/labeler#316 if so.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for the changes, @kachkaev! Couldn't use the GH Action without it! 🙇

Yes, it works the same.

minimatch("root/a/b/c", "root/**/*")
// true
minimatch("root/a/b/c", "root/**")
// true 

@marcotc marcotc self-assigned this Oct 3, 2022
@marcotc marcotc merged commit f5abf1c into master Oct 3, 2022
@marcotc marcotc deleted the action-label-prs branch October 3, 2022 18:21
@github-actions github-actions bot added this to the 1.6.0 milestone Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/github Github repository maintenance and automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants