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

Issue #37: Add ability to exclude certain files from the Packager #38

Merged
merged 2 commits into from Aug 27, 2019

Conversation

docwilmot
Copy link
Member

Fixes #37

$release_node->type = 'module_release';
}
else {
$errors['project_type_invalid'] = t('Project releases are only supported on module projects.');
Copy link
Member

Choose a reason for hiding this comment

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

Looks like in this example, the $errors variable would not be returned anywhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ooops, That was a copy/paste from the api example just above it. Pushed a more appropriate example

* @return NULL
* No return value.
*/
function hook_project_github_create_package_alter($project_name, array $files) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
function hook_project_github_create_package_alter($project_name, array $files) {
function hook_project_github_create_package_alter(array &$files, $project_name) {

I think $files has to be passed by reference in order for this to work.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, and actually most alter hooks have the array that is altered as the first parameter. e.g. hook_form_alter() passes $form, $form_state, and $form_id. This is similar where the $form_id is passed last even though it is the identifier.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in new commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to exclude certain files from the Packager
2 participants