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

feat: Skipping this action when repository is not inlcuded in ZenHub workspace #20

Merged
merged 13 commits into from
Aug 4, 2023

Conversation

mtrunkat
Copy link
Member

@mtrunkat mtrunkat commented Aug 3, 2023

I want to:

But to be able to proceed with this, I updated this action to skip itself when the repository is not included in the ZenHub.

In addition to this, I did a tiny cleanup around the main.js.

Fixes #19

@github-actions github-actions bot added this to the 69th sprint - Platform team milestone Aug 3, 2023
@github-actions github-actions bot added t-platform Issues with this label are in the ownership of the platform team. tested Temporary label used only programatically for some analytics. labels Aug 3, 2023
@mtrunkat mtrunkat added adhoc Ad-hoc unplanned task added during the sprint. and removed adhoc Ad-hoc unplanned task added during the sprint. labels Aug 3, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Pull Request Tookit has failed!

Pull request is neither linked to an issue or epic nor labeled as adhoc!

@mtrunkat mtrunkat added the adhoc Ad-hoc unplanned task added during the sprint. label Aug 3, 2023
Copy link
Member

@jirimoravcik jirimoravcik left a comment

Choose a reason for hiding this comment

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

the new test is commented out on purpose?

@B4nan
Copy link
Member

B4nan commented Aug 3, 2023

Does this also handle #19?

@mtrunkat
Copy link
Member Author

mtrunkat commented Aug 4, 2023

@B4nan I added these few lines of code to fix it:

https://github.com/apify/pull-request-toolkit-action/pull/20/files#diff-4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3dR26

        // This disables skips this action when run on a PR from external fork, i.e., when the fork is not a part of the organization.
        if (!github.context.payload.pull_request?.base.repo.full_name.startsWith(`${ORGANIZATION}/`)) {
            core.warning(`Skipping toolkit action for PR from external fork: ${github.context.payload.pull_request?.base.repo.full_name}`);
            return;
        }

@mtrunkat
Copy link
Member Author

mtrunkat commented Aug 4, 2023

@jirimoravcik It's not a real test. I use it only to test the action locally:

CleanShot 2023-08-04 at 09 24 14@2x

@mtrunkat
Copy link
Member Author

mtrunkat commented Aug 4, 2023

One more addition - I improved the logging and fixed missing await. Tested on non-ZenHub repo here:

CleanShot 2023-08-04 at 09 43 55

@mtrunkat
Copy link
Member Author

mtrunkat commented Aug 4, 2023

And the test on the external fork was done here: #23

CleanShot 2023-08-04 at 09 59 02

@jirimoravcik
Copy link
Member

@jirimoravcik It's not a real test. I use it only to test the action locally:

CleanShot 2023-08-04 at 09 24 14@2x

Sry Mara, didn't notice. It's ok then

@mtrunkat mtrunkat merged commit be89e25 into main Aug 4, 2023
@mtrunkat mtrunkat deleted the feature/generalization branch August 4, 2023 08:11
@fnesveda fnesveda added the validated Issues that are resolved and their solutions fulfill the acceptance criteria. label Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adhoc Ad-hoc unplanned task added during the sprint. t-platform Issues with this label are in the ownership of the platform team. tested Temporary label used only programatically for some analytics. validated Issues that are resolved and their solutions fulfill the acceptance criteria.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The check should pass for people outside of Apify organization
4 participants