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: Properly determine self-approval trigger commit #7936

Conversation

Wirone
Copy link
Member

@Wirone Wirone commented Apr 11, 2024

As you can see here commit message for self-approval is determined improperly when PR is created. Workflow takes last commit from master, and it does not trigger the Bot.

To run a job based on the pull request's head branch name (as opposed to the pull request's base branch name), use the github.head_ref context in a conditional."

Source

@Wirone Wirone added the topic/ci Github Actions, tooling label Apr 11, 2024
@Wirone Wirone requested a review from keradus as a code owner April 11, 2024 10:38
@coveralls
Copy link

coveralls commented Apr 11, 2024

Coverage Status

coverage: 96.013%. remained the same
when pulling f7217f5 on Wirone:codito/fix-self-approval-commit-message-matcher
into 879c368 on PHP-CS-Fixer:master.

@Wirone Wirone assigned Wirone and unassigned keradus Apr 11, 2024
@Wirone Wirone force-pushed the codito/fix-self-approval-commit-message-matcher branch 2 times, most recently from 8b2bafe to 4316368 Compare April 11, 2024 15:37
github-actions[bot]
github-actions bot previously approved these changes Apr 11, 2024
@Wirone Wirone force-pushed the codito/fix-self-approval-commit-message-matcher branch from 4316368 to 1658329 Compare April 11, 2024 15:56
@kubawerlos kubawerlos enabled auto-merge (squash) April 15, 2024 04:52
@kubawerlos kubawerlos merged commit 54f8878 into PHP-CS-Fixer:master Apr 15, 2024
27 checks passed
@Wirone Wirone deleted the codito/fix-self-approval-commit-message-matcher branch April 15, 2024 06:58
@Wirone
Copy link
Member Author

Wirone commented Apr 15, 2024

@keradus unfortunately it does not work 😕. It seems like it tries to checkout branch from the fork, but it's not present in the cloned repo. I need to experiment with it in my fork, for now we need to revert github.event.after...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/ci Github Actions, tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants